Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Vim: Indentation (tab) Settings

with one comment

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

Advertisements

Written by imsaar

February 27, 2006 at 10:18 pm

Posted in general

One Response

Subscribe to comments with RSS.

  1. 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.

    Ali

    February 27, 2006 at 10:26 pm


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: