Vi Tips for Python Programmers
Wednesday September 26, 2007
The longer one programs, the more likely one is to use one of two
text editors, Emacs or Vi, at least once if not
habitually. Having covered Emacs' Python mode in depth, I would
be remiss if I did not mention Vi's Python capabilities.
If you do not have the Python script for Vi(m), you can download it from Vim.org. The Vim shortcuts comparable to some of those mentioned for Emacs are:
If you do not have the Python script for Vi(m), you can download it from Vim.org. The Vim shortcuts comparable to some of those mentioned for Emacs are:
- [[: Go to the beginning of block
- ]]: Go to the end of block
- ]v: Select the current block
- ]<: Shift the block to left
- ]>: Shift the block to right
- ]#: Comment the selection
- ]u: Uncomment the selection
- ]c: Select the current/previous class
- ]f: Select the current/previous function
- ]
: Jump to the previous line with the same/lower indentation - ]
: Jump to the next line with the same/lower indentation
