1

Frankly speaking, I want an integration of vim and IPython, and I know there is such a great vim plugin vim-ipython, I indeed tried this, but it doesn't work out on Windows7 and tried to make it work (non-trivial thing, little documentation about it, failed and gave up).

Now I want to know if it's possible to connect a running ipython kernel from vim and send code to it?

1 Answer 1

4

I had something very similar running at some point. It's not a clean solution in a sense that there is no Vim/IPython integration (as far as I know given the way Vim core is written such integration is unlikely to happen) but it did work.

  1. Install tmux terminal multiplexer (http://tmux.sourceforge.net/)
  2. Launch two tmux panes inside the terminal, one for Vim, one for IPython
  3. Install vim-slime plugin, configure it to use tmux (http://technotales.wordpress.com/2007/10/03/like-slime-for-vim/, https://github.com/jpalardy/vim-slime).
  4. Now, whenever you'll select some code in Vim and press the slime shortcut (C-c C-c by default) it will be sent to the IPython session and executed.

I think this will get the behavior you want. It's also agnostic to IPython and can be used with any REPL environment.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.