如何在Emacs中快速创建IPython shell? [英] How to quickly create a IPython shell in Emacs?
问题描述
当我在emacs中进行python开发时,我想要一个IPython shell。这是我目前的完成方式:
Mx ansi-term
哪些提示我使用运行程序:/ bin / bash
,我用 / usr / bin / ipython
通常情况下,我想在emacs中另一个终端,也许运行应用程序,所以我做:
Mx重命名缓冲区
,并将缓冲区的名称更改为 ipython
,以便轻松更改缓冲区,必须记住哪个终端是IPython shell。 / p>
似乎有一种方法来创建一个可以通过一些按键来完成所有这一切的emacs命令,但是我不知道正确的开始方法,与Emacs相当缺乏经验。
这是代码:
(defun ipython()
(interactive)
(ansi-term/ usr / bin / ipythonipython))
此外, smex 使其更快开始。
When I do python development in emacs, I want an IPython shell available. Here is my current way of accomplishing this:
M-x ansi-term
Which prompts me with Run program: /bin/bash
, which I replace with /usr/bin/ipython
It's often the case that I want another terminal in emacs, perhaps to run the app, so I do:
M-x rename-buffer
and change the name of the buffer to ipython
so that I can change buffers easily, with having to remember which terminal was the IPython shell.
It seems that there would be a way to create an emacs command that would accomplish all of this with a few keystrokes, but I don't know the right way to begin, being fairly inexperienced with Emacs.
Here's the code:
(defun ipython ()
(interactive)
(ansi-term "/usr/bin/ipython" "ipython"))
Also, smex makes it even faster to start.
这篇关于如何在Emacs中快速创建IPython shell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!