Ipython终端的自定义键绑定 [英] Custom Keybindings for Ipython terminal
问题描述
是否可以为Ipython终端界面定义自定义键绑定和/或停用默认键绑定?
Is it possible to define custom keybindings and/or desactivate the default ones for Ipython terminal interface?
例如,我绑定了 C + j 和 C + l 通过配置〜/ .inputrc文件(Linux)在我的终端中左右移动,但是当使用Ipython终端,之前捕获 C + l 并实际清除屏幕。
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的一些键绑定
1) Is it possible to desactivate some keybindings of Ipython
2)更好的是,是否可以完全配置Ipython键映射?
2) Even better, is it possible to totally configure Ipython keymap?
推荐答案
重新发布作为答案:
您可以在配置文件中设置 InteractiveShell.readline_parse_and_bind
(默认值在此处)。它需要一个readline配置命令列表。
You can set InteractiveShell.readline_parse_and_bind
in a config file (default value is here). It takes a list of readline config commands.
IPython也使用.inputrc,但该配置值中的内容优先, Ctrl + < kbd> L 默认存在。
IPython also uses .inputrc, but things in that config value take precendence, and Ctrl+L is in there by default.
这篇关于Ipython终端的自定义键绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!