I’m very pleased to share with you a demo the forthcoming vim-ipython integration which will work with IPython 0.11(trunk).
You can either use the Flash player below, or download the OggVorbis file (14MB) update: vim-ipython ‘shell’ demo (9.6MB). The blog-free form of this post is here.
If you like what you see and want to try it, you can get the details from the vim-ipython github page and it currently requires 4 line changes to IPython, which are currently in this pull request. (Fixed to work on IPython trunk with no changes).
Big thanks to Min for walking me through the new IPython kernel manager during the SciPy2011 sprints.
UPDATE: 2011-08-02
vim-ipython ‘shell’ mode.
Just in case, here are the same videos as above, but hosted on Youtube:
If you’re have any issues, try searching for your error on the vim-ipython github issues page, and if you don’t find it, please file a new one, and I’ll help you out there.
Tags: ipython, python, scipy, vim, vim-ipython
Nice, very, very nice. (And that post did make it to planet scipy :>)
Does this depend on X? Does it ( or could it ever ) work on MS Windows?
Great demo!
it uses vim and ipython – the only tricky bit is ipython has to be installed with zeromq/pyzmq enabled – but everything is cross platform and should work in Windows.
Nice work!
If you run some code with Ctrl-S, is it possible to show the code and output in the ipython window?
There’s nothing preventing that, but I’ve got it working the other way right now. I’ve added a vim-ipython ‘shell’ buffer that shows all of the In[] Out[] prompts regardless of where it was typed (from vim or in the qtconsole).
The qtconsole should do as you say – it just hasn’t been patched with this capability yet.
I updated the post with what I mean by vim-ipython ‘shell’
Both “download it in OggVorbis format” links are to the same `vim-ipython-shell.ogv` file.
Thanks for your work!
fixed, thanks!
I have installed pyzmq-2.1.9,and “import zmq” is right, but when i use gvim “:IPythonClipboard” an error occures:”Import error:IPython.zmq requires pyzmq >2.1.4″.why?
Here’s a quote from the readme, it’s likely one of these two issues:
1. your sys.path in vim differs from the sys.path in regular python. Try running these two lines, and comparing their output files:
$ vim -c ‘py import vim, sys; vim.current.buffer.append(sys.path)’ -c ‘:wq vim_syspath’
$ python -c “import sys; f=file(‘python_syspath’,'w’); f.write(‘\n’.join(sys.path)); f.close()”
or
2. your vim is compiled against a different python than you are launching. See if there’s a difference between
$ vim -c ‘:py import os; print os.__file__’ -c ‘:q’
$ python -c ‘:py import os; print os.__file__’
if that still doesn’t help, please file a bug on the vim-ipython github page
Thanks for your reply.
That still doesn’t help, in fact, when in gvim I type”:py import zmq”, “ImportError:DLL load failed:????????” occurs while other modules in same directory can be imported with no error.(sorry for my chinese)
please file a ticket at https://github.com/ivanov/vim-ipython/issues/new
–
update: this became ivanov/vim-ipython issue #10
Great demo!
I am just wondering how do you visualize the key strokes on the screen?
Thanks
it’s a slightly modified version of key-mon
Hi,
your integration of Ipython into vim looks amazing. However, I can´t get it to work. That´s what I´ve done:
1. Installed it and all commands are available in vim
2. Tried to connect to a running Kernel rises the following error:
:IPython kernel-37371.json failed
^– failed –shell not specified
What is wrong?
Thanks
I think you might be using an old version of vim-ipython. If you’re using the latest version of vim-ipython (the one from GitHub), then it looks like you’re pulling in an old version of IPython. Either way, can you file an issue for it on the vim-ipython github page, and I’ll help you out there (or you can document what you did to make it work for the benefit of others). Thanks!
Hi Paul,
thanks for your reply. I was able to solve my problem. It was because I used an old MacVim Version, which was still available on my Mac although I have upgrade to the a newer version. Now everything works fine.
Thanks!
Awesome project! Kudos to you.
I see on the github page, it says that “ipdb support is not yet re-implemented.” Does that mean ipdb will work with vim-ipython eventually? That’d be great.
Right now, if I put in a pdb break point it freezes the ipython kernel. I take it that is expected for now?
Thanks
that’s right, back in IPython 0.10 and prior, I used to use ipdb from vim all the time, so it’s on my todo list to get this functionality back into vim-ipython.