[Sublime Text 2] How to Configure Indent Settings

Tadashi Shigeoka ·  Sun, May 27, 2012

I researched how to configure indent settings in Sublime Text 2, so here’s a memo.

For configuration, it was recommended not to edit the Preferences.sublime-settings in “Settings - Default” under Sublime Text 2 → Preferences, but to write settings in “Settings - User” to override them.

// While you can edit this file, it's best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.

Therefore, I opened the file in “Settings - User” and added the following content.

I set the tab key to “2 half-width spaces”.

{
    // The number of spaces a tab is considered equal to
    "tab_size": 2,

    // Set to true to insert spaces when tab is pressed
    "translate_tabs_to_spaces": true
}

That’s all from the Gemba.