WARNING! This documentation is for an old, unsupported version of Sublime Text. Please check out the current docs.

Indentation Settings

The indentation settings are guessed automatically when a file is opened. If the settings can't be guessed, the settings listed below are used.

Changing indentation for the current buffer

Indentation settings are available from the View/Indentation menu. Selections made here are applied to the current buffer only.

Changing default indentation settings

The following File Type Preferences determine the indentation settings:

  • translateTabsToSpaces: set to either 'true' or 'false'. If true, then when tab is pressed, an equivalent number of spaces will be inserted into the buffer instead. Defaults to false.
  • tabSize: controls the visual width of tabs. If translateTabsToSpaces is true, this also controls the number of inserted spaces. Defaults to 4.
  • useTabStops: controls the behavior of tab and backspace when translateTabsToSpaces is true. If set, then they will insert/delete up to the next tab step (multiple of tabSize). Defaults to true.

Automatic Indentation

Sublime Text will automatically increase and decrease the indentation levels at the appropriate times. While the built in logic works for most languages, it doesn't work for all.

Automatic Indentation can be controlled with the autoIndent file type preference.