python / python/cpython

Add vi mode to pyrepl

Abierto
#141,374 2 comentarios 11 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

stdlib topic-repl type-feature
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Feature or enhancement

Proposal:

Since PyREPL implements its own readline mechanism, vi mode is not supported anymore unless the user reverts to the old REPL using PYTHON_BASIC_REPL. This comes up from time to time in issues like #118840 or #127706.

I propose a simple vi mode implementation directly in PyREPL which offers basic motion and editing functionality. This should reduce friction for users who prefer to use vi editing mode and are forced to rely on the old REPL for this. Achieving feature parity in this regard with the old REPL might also help fully removing the old implementation.

I can submit a PR with a basic implementation for review, which adds motions and simple editing commands. It still requires adding yank & paste, undo, linewise commands, etc. which I'm happy to implement if PyREPL code owners are happy to move forward with the feature and the design looks reasonable.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs
  • gh-141375

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza revisando el mecanismo readline de PyREPL y la REPL antigua seleccionada por PYTHON_BASIC_REPL; después, lee el PR enlazado gh-141375. Para darlo por terminado sería necesario acordar un modo vi básico con comandos de movimiento y edición; yank y paste, deshacer y los comandos orientados a líneas también se han identificado como trabajo pendiente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
cli
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.