Sublime Forum

Tab size - how many more settings to change?

#1

Hi!

I want to set the tab size to 2. Done that in the user preferences, done that for the YAML syntax. Still it is on 4.

How many times (and where) do I have set the tab size so that sublime will actually remember that? The editor is such an efficient tool, why they told a Microsoft guy to make the preferences (from the design point: complex, inefficient, redundant and completely confusing)? :wink:

Thank you very much in advance and kind regards,

Anton

0 Likes

No support for sublime users?
Unable to change translate_tabs_to_spaces setting
#2

As asked, my relevant settings:

User settings - the … means that I have other customizations and are not actually in the file :wink:

{ ...
	"tab_size": 2,
	"translate_tabs_to_spaces": true,
... }

YAML.sublime-settings (inserted this after I realized that yaml files have tab 4 most of the time):

{
  "tab_size": 2,
  "translate_tabs_to_spaces": true
}
0 Likes

#3

Maybe you have “Guess settings from buffer” active, and there is text indented with 4 spaces there already.

Also note that if you want to change the indent size in a file using spaces for indent, you must first convert to tabs, then change the indent size, then convert back to spaces.

0 Likes

#4

I think svenax is correct, you must add:

"detect_indentation": false ]
to your YAML.sublime-settings (or user settings)

0 Likes

#5

Thanks!!!

bizoo, I think the “detect_indentation”: false did the trick. No idea why it sometimes opened the same files with 2 and sometimes with 4. After adding this setting I was able to open 20 yml files all with a tab size of 2 :smiley: :smiley: :smiley:

GREAT!!!

0 Likes