Search code examples
vimread-eval-print-loop

Vim: Run selected code in a persistent REPL-environment


R, Python, Scala etc. all come with REPL-environments, which I don't want to miss, however, most of the time editing text in them sucks, so I edit the code in vim, paste it and look at the output and edit the code in vim again.

I can run the current file with !python % and I can run the current line with even more vim magic, however, this will start a new process of the interpreter.

Is it possible to start a REPL and send lines of code to the running REPL (and get the results back, obviously)?


Solution

  • Maybe one of these two plugins is what you need: