我一直试图将我的%编辑编辑器设置为Emacs一段时间,并且进展非常缓慢。
IPython 0.13文档还不清楚如何实际配置它。它告诉我通过添加将EDITOR设置为所需的编辑器(在我的情况下,“emacsclient”)
c = get_config()
c.InteractiveShell.editor = 'emacsclient'
到我的ipython文件夹中的配置。
但是,我找不到任何这样的文件夹。我花了很长时间四处寻找如何设置IPython环境变量并找到相关的片段。使用什么代码。启动脚本的.py和.ipy文件之间的区别。等等。
我正在使用Ubuntu 12.10。我在哪里放置我的配置文件IPython 0.13?
我有 c.TerminalInteractiveShell.editor = 'emacsclient'
在 ~/.config/ipython/profile_default/ipython_config.py
它的工作原理。
如果您在查找配置位置时遇到问题,请使用 ipython locate profile
命令:
http://ipython.org/ipython-doc/rel-0.13/whatsnew/version0.13.html#new-top-level-locate-command
但我认为设置编辑器的最简单方法是使用类似的东西 export EDITOR=emacsclient
在你的 贝壳 设置(例如 ~/.bashrc
)。