Vim: Run selected code in a persistent REPL-environment

前端 未结 5 1857
逝去的感伤
逝去的感伤 2020-12-09 12:38

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

5条回答
  •  轮回少年
    2020-12-09 13:04

    Not for plain-python alone, but if you're using IPython 0.11 or later, take a look at vim-ipython.

    Using this plugin, you can send lines or whole files for IPython to execute, and also get back object introspection and word completions in Vim, like what you get with: object? and object. in IPython. Additionally, vim-ipython has a "shell" mode, where as you send lines to IPython, you get to see the results those lines produced back in the specialize buffer. See the second screencast on this post

提交回复
热议问题