... or to set it globally in the profile configuration (~/.ipython/profile_default/ipython_config.py; create it with ipython profile create if you don't have it) with:
你可以把 vi 放在你的。Ipython 启动配置文件。如果没有,可以创建一个,方法是向 ~/.ipython/profile_default/startup/添加一个名为 start.py的文件。这里有一个例子:
# Initializing script for ipython in ~/.ipython/profile_default/startup/
from IPython import get_ipython
ipython = get_ipython()
# If in ipython, set vi and load autoreload extension
if 'ipython' in globals():
ipython.editing_mode = 'vi'
ipython.magic('load_ext autoreload')
ipython.magic('autoreload 2')
from Myapp.models import *