Vim: Indentation (tab) Settings

In the same discussion that I discovered the settings for ruby specific settings I found some tips on best setting of tab and shift related settings

sts=2 sw=2 ts=8 et

Here is my understanding of the settings:

sts = smart tab stops – these are useful when you hit tab for indenting, when you hit backspace you will go back a sts lenth rather than one space at a time because of et is enabled

sw = shift width – this is useful when you do <> for indenting

ts = tab stop – would render the real tab (tab character) properly if found in your code

et = expand tabs – replaces/exapnds tab to spaces

One Response
  1. February 27, 2006