vi and python?
Mike Steed
MSteed at altiris.com
Tue Jan 25 18:36:03 EST 2000
> From: Ben Beuchler [mailto:insyte**NOSPAM**@emt-p.org]
> Sent: Tuesday, January 25, 2000 3:22 PM
> To: python-list at python.org
> Subject: vi and python?
>
>
> There seems to be a general preference for emacs in the
> python community. I am personally much more comfortable
> working with vim. Does anyone have any particular tips for
> python development within vim? Particular shortcuts to test
> code, autoindentation settings, etc... I would particularly
> like to be able to use some of the idle features with,
> perhaps, gvim...
Nothing too fancy, but here are the settings I have accumulated for *.py
files. The ^H and ^M are actually literal control characters.
" indentation
set shiftwidth=4 softtabstop=4 tabstop=8 noexpandtabs
set nocindent smartindent
set cinwords=if,else,elif,for,while,def,class,try,except,finally
set formatoptions=croq2
" disable dedent when '#' is hit
inoremap # X^H#
" python versions of [[ and ]]
map ]] /^[^ \t#]\+.*:^M
map [[ ?^[^ \t#]\+.*:^M
--
M.
More information about the Python-list
mailing list