On Jul 24, 9:32 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > In message > <[EMAIL PROTECTED]>, Matimus > wrote: > > > On Jul 24, 2:54 am, Lawrence D'Oliveiro <[EMAIL PROTECTED] > > central.gen.new_zealand> wrote: > >> In message > >> <[EMAIL PROTECTED]>, > > >> Matimus wrote: > >> > That isn't the standard. With that setup tabs will show up as 4 > >> > spaces, and still confuse you. > > >> Why should that be confusing? The most common tab-stop setting is 4 > >> columns. > > > A tab character is specified as 8 spaces. > > Specified by whom? The most common setting these days is 4 columns.
All argument about specification aside, Python interprets a tab character as equivalent to 8 spaces. If you are treating tabs as equivalent to 4 spaces in your python code it will cause IndentationError exceptions to be raised. If you set 'tabstop' to 4 in Vim all of the blocks of code indented using 4 spaces will be aligned with code indented with tabs. That is obviously problematic. Setting 'et' will fix the problem of inserting tabs, but does nothing to adjust the way tabs are displayed. Vim has a feature 'softtabspace'/'sts' which is used to modify the way tabs are inserted without modifying the way they are displayed. If you are writing python code using Vim and you intend to indent using 4 spaces (as recommended by pep8), the best practice I have found is to `set sw=4 ts=8 sts=4 et`. Matt -- http://mail.python.org/mailman/listinfo/python-list