[英]IPython on emacs blocks keybindings
This is an issue with lots of related questions but none seems to work out for me. 这是一个涉及很多相关问题的问题,但似乎没有一个问题适合我。 I need to use IPython in a similar way as I use Mx shell
, but of course with python-related completion. 我需要以与使用Mx shell
类似的方式使用IPython,但当然与python相关的完成。 The solution by abo-abo in this previous question How to open IPython interpreter in emacs? abo-abo在上一个问题中的解决方案如何在emacs中打开IPython解释器? does the trick. 诀窍。 However, it has the secondary effect of disabling keybindings when I am in the IPython buffer (ie I cannot, for example, change buffers with Cx o ). 但是,当我在IPython缓冲区时,它具有禁用键绑定的辅助效果(例如,我不能用Cx o更改缓冲区)。 Is there any easy way of solving this? 有没有简单的方法来解决这个问题?
Code from previous answer: 以前回答的代码:
(defun ipython ()
(interactive)
(term "/usr/bin/ipython"))
Just to give you an idea that it's possible to use Mx shell
with ipython: 只是为了让你知道可以在ipython中使用Mx shell
:
(let ((explicit-shell-file-name "/usr/bin/ipython"))
(shell))
But now tab completion doesn't work. 但现在标签完成不起作用。 Maybe there is a solution to this, I'm not sure. 也许有一个解决方案,我不确定。
I prefer ansi-term
to shell
somehow. 我更喜欢ansi-term
到shell
。 By the way, did you know that Cc Cj calls term-line-mode
in ansi-term
? 顺便说一句,你知道Cc Cj在ansi-term
称为term-line-mode
? Cc Ck switches back to the default term-char-mode
. Cc Ck切换回默认的term-char-mode
。 In term-line-mode
you can move about the buffer with usual navigation bindings etc. 在term-line-mode
您可以使用常规导航绑定等移动缓冲区。
Maybe give python-mode.el a try. 也许试试python-mode.el吧。 Mx ipython RET
should do it than. Mx ipython RET
应该比。
the code you posted but insted use ansi-term: 您发布的代码但是使用了ansi-term:
(defun ipython ()
(interactive)
(ansi-term "/usr/bin/ipython"))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.