Setting vim for python (Was: Re: [rfc][patch])

Jan Hudec bulb at ucw.cz
Tue Jan 3 11:33:05 GMT 2006


On Tue, Jan 03, 2006 at 11:03:07 +0100, Erik B?gfors wrote:
> This is one of the reasons I do not like python. I think it's
> braindead to use indentation like this. :)
> 
> Anyone here using vim that can show me their setup? If I have the
> following line (S=space, T=tab)
> 
> SSSSSSfoo=5
> 
> And then go to the end of that line, and hit enter, vim helps me by
> doing the following
> T<cursor>

Does it? You have only 6 spaces there. That's not a tab.

> And messes everything up.

:set et

That's it. If the file is already screwed up, do:

:retab

afterwards.

I suggest adding something like following to your vimrc:

au FileType python set et

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060103/fae2eb3e/attachment.pgp 


More information about the bazaar mailing list