I love to use bpython but in Ruby there is a gem called interactive_editor that makes it possible to combine Vi(m) with the Ruby shell which makes the Development process much more comfortable. A good introduction to interactive_editor: http://vimcasts.org/episodes/running-vim-within-irb/
Are there any tools (like interactive_editor for Ruby) available to combine the Python shell with Vi(m)?
Vim is quite a powerful text editor which can add performance to the already fast typed language Python. Vim can be highly customizable and efficient to use as it has the power of adding custom plugins and plugins managers, key mappings , and the most critical weapon of vim - Access to the terminal straight away.
The shell is where you write your code directly in the CLI, whereas the interpreter is the program that will interpret your code and execute it. Therefore, the interpreter is called in the shell when you write some code, it may also be called when you execute some python code directly from a file.
There are two ways to use the python interpreter: interactive mode and script mode.
You could have a look at the vim-ipython vim plugin:
https://github.com/ivanov/vim-ipython
This requires you to install the ipython shell (but I recommend doing this anyway as it adds a lot of functionality to the standard python shell).
If you don't want to install ipython, I suggest having a look at the ConqueShell plugin for vim:
http://www.vim.org/scripts/script.php?script_id=2771
This lets you run shells within vim. Once you've sourced the vim-ball, all you need to do is
:ConqueTerm python
to get a python shell directly in vim.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With