1. Home
  2. Computing & Technology
  3. Python
Python Blog

From Al Lukaszewski, for About.com

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:
  • [[: 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
Explore Python
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Python

©2009 About.com, a part of The New York Times Company.

All rights reserved.