[IPython-user] turning off the return to editor option
vivainio at gmail.com
Sat Jan 28 14:30:48 CST 2006
On 1/28/06, Ryan Krauss <ryanlists at gmail.com> wrote:
> Is there a hook for the function that calls fix_error_editor? Now
> that this is working well, I would like to check if gvim has a server
> names ipython, and to go to the error automatically if it does rather
> than prompting me.
You can now disable the query (assuming "yes") by setting autoedit_syntax to 2.
Programmatically, it means
ip = IPython.ipapi.get()
ip.options().autoedit_syntax = 2
BTW, you should really call ip.set_hook (or _ip.set_hook if the script
is being executed in ipython namespace) instead if ip_set_hook, it's
cleaner that way.
If you have all the stuff in one module, it can just be imported (as
opposed to exec'd) and it install everything correctly. I've already
changed the documentation in hooks.py.
I think I'll put a "modernized" version of your gvim script to our
examples folder (when I get around to it), it'll be cool when the
users can just copy the script to ~/.ipython and add "import
gvim_server_editor" to their ~/ipython/ipy_user_conf.py.
Ville Vainio - http://tinyurl.com/2prnb
More information about the IPython-user