2

This would make my workflow immensely easier -- I have some simple maps for executing python .py files, and sometimes it would be nice to open an interactive session after running them (for example, an IPython shell using :!ipython -i %).

Right now, if I want to run an interactive session, I am trapped there (as this is a process that has not "finished") until I close the session and see the press Enter to continue message. But I was wondering if there was a way to switch back and forth between files open in Vim and this active process.

1
  • There exist a few plugins that seem to do that for us. Search for "vim + REPL". Other people may guide you toward more specific solutions. Commented Feb 28, 2017 at 15:13

1 Answer 1

2

You can do that and so much more with tmux

vim + tmux - OMG!Code - YouTube

vim + tmux: A Perfect Match

tmux is a terminal multiplexer: it enables a number of terminals to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

You can for example, split your screen, run your session and switch back whenever you like.

For better navigation also install https://github.com/christoomey/vim-tmux-navigator

0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.