What's the canonical vi setting for Python indentation

Georg Mischler schorsch at schorsch.com
Wed Dec 1 08:08:39 EST 1999


Quinn Dunkan wrote:
> Malcolm Tredinnick wrote:
> >On Tue, Nov 30, 1999 at 11:46:10PM +0000, Sean Blakey wrote:
> >> I don't know about canonical, but I have the following in my .vimrc
> >> set expandtab	"Turn's tabs into spaces
> >> set hardtabs=4	"Make tabs 4 spaces wide
> >> set tabstop=4
> >> set shiftwidth=4	"For use with << and >>
> >
> >I tend to avoid 'set expandtab' to save typing. If I want to
> >back out from one indentation level to the previous one, it
> >takes a single BackSpace to do so. If I am using the 'expandtab'
> >setting, it takes four keystrokes (these things matter to me).
> >Of course, I am also using the 'autoindent' setting (but, then
> >again, doesn't everybody in vim?).
>
> Note that in vim5, you can set softtabstop=4 to take out
> expanded tabs with a single backspace.  Here's my config:

Note that with *any* vi implementation you can use ^D to step
back for whatever space sw= is set to. This even works in some
of the situations where backspace wouldn't do anything.


Have fun!

-schorsch

--
Georg Mischler  --  simulation developper  --  schorsch at schorsch.com
+schorsch.com+  --  lighting design tools  --  http://www.schorsch.com/


Sent via Deja.com http://www.deja.com/
Before you buy.




More information about the Python-list mailing list