Saari Development

This blog is intended to be a log of my (Ali Rizvi's) professional ramblings as a software development engineer. I intend to add logs of my experience with different technologies, software, tech books/articles and related stuff from time to time. My intention is to have an archive for my personal use and public benefit.

Monday, February 27, 2006

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 << or >> 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

1 Comments:

Blogger Ali said...

The question that comes to mind is what setting is used sts or sw when indenting using ==.

It seems == is relative to previous line so may be none of those.

2:26 PM  

Post a Comment

<< Home