Skip to content

Add vi mode to pyrepl #141374

@lkollar

Description

@lkollar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions