How do I use vi keys in ipython under *nix?

前端 未结 6 1340
闹比i
闹比i 2020-12-04 07:48

Currently in Bash I use set -o vi to enable vi mode in my bash prompt.

How do I get this going in ipython?

Note: If an answer applies t

6条回答
  •  广开言路
    2020-12-04 08:10

    In case someone's wandering in here recently, IPython 5.0 switched from readline to prompt_toolkit, so an updated answer to this question is to pass an option:

    $ ipython --TerminalInteractiveShell.editing_mode=vi
    

    ... or to set it globally in the profile configuration (~/.ipython/profile_default/ipython_config.py; create it with ipython profile create if you don't have it) with:

    c.TerminalInteractiveShell.editing_mode = 'vi'
    

提交回复
热议问题