python - 我在哪里放置 IPython 配置文件?

标签 python emacs editor ipython

一段时间以来,我一直在尝试将我的 %edit 编辑器设置为 Emacs,但进展非常缓慢。

IPython 0.13 文档不清楚如何实际配置它。它告诉我通过添加

将 EDITOR 设置为所需的编辑器(在我的例子中是“emacsclient”)
c = get_config()
c.InteractiveShell.editor = 'emacsclient'

到我的 ipython 文件夹中的配置。

但是,我找不到任何这样的文件夹。我花了很长时间四处寻找如何设置 IPython 环境变量,但只找到了相关的片段。使用什么代码。启动脚本的 .py 和 .ipy 文件之间的区别。等等

我正在使用 Ubuntu 12.10。 IPython 0.13 的配置文件放在哪里?

最佳答案

我在 ~/.config/ipython/profile_default/ipython_config.py 中有 c.TerminalInteractiveShell.editor = 'emacsclient' 并且它有效。

如果您找不到配置位置,请使用 ipython locate profile 命令: http://ipython.org/ipython-doc/rel-0.13/whatsnew/version0.13.html#new-top-level-locate-command

但我认为设置编辑器的最简单方法是在您的 shell 设置中使用类似 export EDITOR=emacsclient 的东西(例如 ~/.bashrc).

关于python - 我在哪里放置 IPython 配置文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15403523/

相关文章:

Python 字典作为 ipython 笔记本中的 html 表

python - 带有注册额外字段的 Django 社交身份验证

java - 配置 IntelliJ 以使用 Java 14 和记录

javascript - 使用 nicEdit 按类名选择实例

jquery - 基于 GUI 或基于 Web 的 JSON 编辑器,类似于属性浏览器

python正则表达式来检测一个词是否存在

python - pip 在 pyenv 中使用时不应答

emacs - 如何根据条件加载yasnippets

emacs - 带行号的动态全局替换,emacs

string - Emacs重复字符串n次