在Jupyter控制台中使用Vi Keys

问题描述 投票:4回答:1

我想知道如何在Jupyter控制台中使用类似vi的键绑定 - 不仅仅是使用ipython,而是使用任何内核。

Previous answers表明这对ipython来说是可能的。所以,也许有一些标志或配置文件可以指定。 Jupyter似乎没有相当于ipython profile并且给出与ipython中相同的标记变量不起作用。

vim jupyter vi jupyter-irkernel jupyter-console
1个回答
4
投票

Jupyter console documentation几乎提供了答案。对于标志,您只需要更改变量名称:

jupyter console --kernel=ir --ZMQTerminalInteractiveShell.editing_mode=vi

要全局设置此选项,您必须将c.ZMQTerminalInteractiveShell.editing_mode='vi'添加到$HOME/.jupyter/jupyter_console_config.py。有必要在'c.'前加上前缀,类似于运行ipython profile create时创建的内容,文档未指定。

© www.soinside.com 2019 - 2024. All rights reserved.