Reputation: 19873
I have the following in my user/Preferences.sublime-settings
{
"tab_size": 2,
}
And most of the time it works. But once in a while I open a ruby file, and it jumped back to 4 spaces. I'm wondering if there is some bug or slight difference in opening a file that could change this?
Having trouble tracking this down. Thanks for the help.
Upvotes: 19
Views: 5661
Reputation: 531
You'll want to add:
"detect_indentation": false
This is on by default and ST is trying to be smart detecting the indentation of your current file, overloading the user or syntax specific default.
Upvotes: 14
Reputation: 83706
Here are various Sublime Text 2 tab settings explained:
Note that the tab setting may be per file type
There is also autodetect from file enabled by default and your source code file may contain bad tabbing
Upvotes: 7