Vim scripts for editing Python?

Tim Chase python.list at tim.thechases.com
Tue Nov 21 09:33:37 EST 2006


> For example, to auto-fold all function bodies while leaving
> the function names visible.

Do you mean

	:set foldmethod=indent

which does what I think you're describing...

> Also to auto-close braces like [], (), {}, autoclose quotes.

You can map whatever you like:

	:inoremap [ []<left>
	:inoremap ( ()<left>
	:inoremap { {}<left>
	:inoremap " ""<left>
	:inoremap ' ''<left>

which will do the trick for you.

As for the other things, I haven't monkeyed with them, but if you
drop by the vim mailing list, there are other smart cookies there
that can help you out.  I've heard of such abilities...just
haven't played with them.

-tkc





More information about the Python-list mailing list