Write Your Python Script To write in the vim editor, press i to switch to insert mode. Write the best python script in the world. Press esc to leave the editing mode. Write the command :wq to save and quite the vim editor ( w for write and q for quit ).
Why is Vim a good Python development environment? Vim's philosophy is that developers are more productive when they avoid taking their hands off the keyboard. Code should flow naturally from the developer's thoughts through the keyboard and onto the screen.
Currently -python and -python3 seem to be the default for the Debian vim package. If you need vim support for scripting languages, install vim-nox , which is dedicated to them and therefore has (among other things) +python3 enabled.
You can use Gutentags plugin for automatic tags management. Type :ImportName [<name>] to add an import statement at the top of the file. Type :ImportNameHere [<name>] to add an import statement above the current line. Needs Vim 7.0, preferably built with Python support.
Here is all I know of in terms of such docs:
:help python-vim is a good start. The best vim resource is always at your fingertips and the sooner you get used to referring to it the better you will get at vim overall.
I got better at searching vim help with this..
How do I make vim do normal (bash like) tab completion for file names?
also :he vim-script-intro
I'd also recommend looking straight at the source of existing plugins that do something similar to what you want to do. That way you cut out the middle man and dont have to deal with blog ads and other distractions.
Have you checked out Learn Vimscript The Hard Way? It is an excellent read.
vim 7.0 and above can be compiled with the +python
flag, which gives vim Python support. This is a (albeit, somewhat extreme) path to getting the language support you want.
Links
Refer to the Scripting chapter in 'A Byte of 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