Misuse of <tab>

Asun Friere afriere at yahoo.co.uk
Wed Jul 30 22:41:24 EDT 2003


"Keith Jones" <kmj9907 at cs.rit.edu> wrote in message news:<pan.2003.07.30.20.07.18.351027 at cs.rit.edu>...
> On Wed, 30 Jul 2003 17:25:05 +0000, max wrote:
> 
> > The problem with spaces is that you need to do 5 times the work of a tab
> > to get decent-looking indentation :).
> 
> Not if you have a good editor.. Use vim or emacs. In vim, try :h sts (I
> think, or :h softtabstop) ...it would suck to have to type
> <space><space><space><space> all the time, but you don't. :)

If you use vim remember to put 'set expandtab' (or if you wanna be
fancy 'au BufRead,BufNewFile *.py set expandtab' ) into your .vimrc
(or .exrc) file.  This way you can use '[Ctrl]-[T]' and '[Ctrl]-[D]'
to in- and un-dent in insert mode, as well as '>>' and '<<' in command
mode, without fear of hard tabs being inserted.  (Though the way vi(m)
mixes tabs and spaces is consistent enough that you wouldn't usually
get into any trouble with it.)




More information about the Python-list mailing list