Skip to content

Use vi mode for prompt_toolkit layout #10085

Open

Description

@ndronen

As noted elsewhere (prompt-toolkit/python-prompt-toolkit#432), prompt_toolkit lacks a mechanism for the history search prompt to be customized for vi mode. The default inside prompt_toolkit is emacs mode, so vi mode users are shown the emacs mode history search prompt (e.g. "I-search: ", "I-search backward:") instead of "/" or "?". When the prompt_toolkit issue is resolved, please update IPython to pass the appropriate argument (likely editing_mode) to create_prompt_layout.

Activity

  1. jonathanslenders commented on Mar 4, 2017

    @jonathanslenders
    Contributor

    FYI: There was some confusion that this won't be fixed in prompt_toolkit. In fact there is no reason not to make this work exactly like readline. However, it will probably have to wait for prompt_toolkit 2.0 where I'm refactoring some part of the search functionality.

  2. ivanov commented on May 17, 2017

    @ivanov
    Member

    I just want to mention that if you would like the old (IPython <= 4.x) readline interface, it is now available separately as rlipython.

    pip install rlipython
    python -c "import rlipython as r; r.install()"
    

    Right now, it only works in IPython 6.0 (Python 3), but it will also work in Python 2 with the next IPython 5 release (5.4).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions