具有Vi(m)集成的Python解释器Shell可能吗?

Sta*_*erd 12 python vi

我喜欢使用bpython但是在Ruby中有一个名为interactive_editor的gem,它可以将Vi(m)与Ruby shell结合起来,这使得开发过程更加舒适.interactive_editor的一个很好的介绍:http://vimcasts.org/episodes/running-vim-within-irb/

有没有可用的工具(比如Ruby的interactive_editor)将Python shell与Vi(m)结合起来?

Pas*_*ion 13

你可以看看vim-ipython vim插件:

https://github.com/ivanov/vim-ipython

这需要你安装ipython shell(但我建议这样做,因为它为标准的python shell添加了很多功能).

如果您不想安装ipython,我建议您查看vim的ConqueShell插件:

http://www.vim.org/scripts/script.php?script_id=2771

这使您可以在vim中运行shell.一旦你采购了vim-ball,你需要做的就是

:ConqueTerm python
Run Code Online (Sandbox Code Playgroud)

在vim中直接获取python shell.