vim - what's a smarttab?

Marco marco at yafd.de
Mon Sep 24 06:49:17 EDT 2007


Hi "7stud",

> Alternatively, what is a smarttab?

in VIM type :help smarttab and you'll see the following:

'smarttab' 'sta'        boolean (default off)
                         global
                         {not in Vi}
When on, a <Tab> in front of a line inserts blanks according to
'shiftwidth'.  'tabstop' or 'softtabstop' is used in other places.  A
<BS> will delete a 'shiftwidth' worth of space at the start of the
line.
When off, a <Tab> always inserts blanks according to 'tabstop' or
'softtabstop'.  'shiftwidth' is only used for shifting text left or
right |shift-left-right|.
What gets inserted (a Tab or spaces) depends on the 'expandtab'
option.  Also see |ins-expandtab|.  When 'expandtab' is not set, the
number of spaces is minimized by using <Tab>s.
NOTE: This option is reset when 'compatible' is set.

If you'd like to use VIM for Python make sure you have the following 
settings for the best result:
http://www.vex.net/~x/python_and_vim.html

Marco



More information about the Python-list mailing list