Table of Contents

VIM - Config - Indentation - Indentation Options

expandtab

expandtab affects what happens when you press the <TAB> key.


shiftwidth

shiftwidth affects what happens when you press », « or ==.


smarttab

smarttab affects how <TAB> key presses are interpreted depending on where the cursor is.


softtabstop

softtabstop affects what happens when you press the <TAB> or <BS> keys.


tabstop

tabstop changes the width of the TAB character, plain and simple.

NOTE: Considerations:

  • Using a tabstop value other than the default (8 spaces), will result in your file having a different appearance when using tools such as cat (type on Windows), which cannot use a custom width tab character.
    • On the other hand, using hard tabs for indentation, allows others to view your code with the amount of indentation they prefer.
    • Which of these considerations should have priority, is a matter of personal preference (and company policy).