Python block motion in Vim

jafo@tummy.com jafo@tummy.com
Wed, 23 May 2001 05:39:47 -0600


I just hacked together some code using the Python extension to vim that
handles moving to the start and end of a code block (like using '%' on the
braces in a language so impaired ;-).  Basically it moves to the first or
last line at the current indent level or higher -- stopping before getting
to a (non-blank) line of lesser indent.

I don't use '(' or ')', so I do:

   pyfile /home/jafo/vim/vim.py
   map ( :python pythonblockStart()^M
   map ) :python pythonblockEnd()^M

It's available at ftp://ftp.tummy.com/pub/tummy/python-vim/

Sean
-- 
 Language is the most important .. uh..  I think you know what I'm trying
 to say.  -- Steve Martin
Sean Reifschneider, Inimitably Superfluous <jafo@tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python