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

前端 未结 6 1308
闹比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:16

    I needed to be able to switch modes interactively in IPython 5 and I found you can do so by recreating the prompt manager on the fly:

    a = get_ipython().configurables[0]; a.editing_mode='vi'; a.init_prompt_toolkit_cli()
    

提交回复
热议问题