[FRPythoneers] Python block motion in Vim

jafo at tummy.com jafo at tummy.com
Wed May 23 05:40:16 MDT 2001


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 at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python



More information about the FRPythoneers mailing list