Add vi mode to pyrepl
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 77.2k
- Fork
- 35.9k
- Metriche di merge delle PR
- Metriche PR in attesa
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando il meccanismo readline di PyREPL e la vecchia REPL selezionata da PYTHON_BASIC_REPL, quindi leggi la PR collegata gh-141375. Per considerare il lavoro completato sarebbe necessario concordare una modalità vi di base con comandi di movimento e modifica; yank e paste, annullamento e comandi a livello di riga sono stati inoltre identificati come parte del lavoro rimanente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100