Ipython 终端的自定义按键绑定

2023-12-13

是否可以定义自定义键绑定和/或停用 Ipython 终端界面的默认键绑定?

For example, I have bound C+j and C+l to move left and right in my terminal by configuring the ~/.inputrc file (Linux), but when using Ipython terminal, C+l is captured before and actually clears the screen.

所以我的问题是:

1)是否可以停用Ipython的某些按键绑定

2)更好的是,是否可以完全配置Ipython键盘映射?


重新发布作为答案:

您可以设置InteractiveShell.readline_parse_and_bind在配置文件中(默认值在这里)。它需要一个 readline 配置命令列表。

IPython also uses .inputrc, but things in that config value take precendence, and Ctrl+L is in there by default.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Ipython 终端的自定义按键绑定 的相关文章

随机推荐