Indenting lines 400..457 help

Geoff Gerrietts geoff at gerrietts.net
Thu Apr 11 15:39:55 EDT 2002


Quoting Paul Boddie (paul at boddie.net):
> 
> [expandtab]
> 
> I tend to use the following line at the end of my Python files:
> 
>   # vim: tabstop=4 expandtab shiftwidth=4
> 
> I think this makes virtually all tab instances soft and equivalent to
> 4 spaces in vim/gvim. Having been a "hard tab user" for years, I
> finally switched to soft tabs out of compatibility with just about
> everything else written in Python - oh, the shame!


As I've said elsewhere in this thread, I actually recommend:

# vim: sts=4:ts=8:et:sw=4

The reason I recommend you leave tabstop at 8 and use softtabstop at 4
is because Python will treat your hard tabs as 8 spaces, so if one (or
more) DO creep in, it will be difficult to see what's wrong when your
eyes aren't treating tabs the same way as the interpreter.

Softtabstop (sts) is in most situations indistinguishable from a
tabstop setting, so you really get the best of both worlds. Yay vim!
:)

--G.

-- 
Geoff Gerrietts <geoff at gerrietts dot net>
-rw-rw-rw-:         permissions of the beast





More information about the Python-list mailing list