SLIME-like communication from VIM to ipython

We can now beam blocks of code from VIM into IPython!

You can see it in action in the video below, or just try it out for yourself; ipython comes with nearly everything you need by default.


Installation:

mkdir -p ~/.vim/ftplugin/python
cd ~/.vim/ftplugin/python 
wget http://github.com/m5/ipy-vim/raw/master/ipy.vim 


Usage:
Load up ipython, and run:

import ipy_vimserver 
ipy_vimserver.setup("demo") 
%vim 

You now have a vim session linked with ipython. Open up your favorite
python script, and get back to work! Hit F5 to run your file in
ipython, or F4 to run the current line or selection. You can also use
F6 and F7 to set breakpoints and run pdb, but I haven't tried it out
yet.

Thanks should be directed toward Sebastian Busch and Paul Ivanov

Troubleshooting:

GVim doesn't pop up, VIM just replaces my ipython session:
Try setting "editor" in your .ipythonrc to "gvim"
Nothing happens when I hit F4/F5:
Do you have other filetype plugins working? If not, add "filetype plugin on" to your .vimrc

About


Twitter