Sublime Forum

Spaces getting converted to tabs

#1

This started happening a couple of weeks ago. I don’t know why, I don’t know how and I haven’t found a pattern.

More often than not (but not every single time in every single file), ST3 (build 3083) will take it upon itself to convert my spaces to tabs. My settings, as far as I can tell, are correct:

{

“tab_size”: 2,
“translate_tabs_to_spaces”: true,
“trim_trailing_white_space_on_save”: true,
“use_tab_stops”: true,

}

I use the Vintageous plugin, but it happens even when I save via Cmd+S. I can monkey with the tab settings from the status bar or from the main menu, but no matter how often I

a) Check “Indent Using Spaces” and,
b) Click Convert Indentation to Spaces

the moment I save the document everything changes right back. What could I have possibly done to inflict this upon myself? I’ve even tried applying the same settings above at the project level with no change (not surprising, I know). I don’t know what else to try. This is making ST unusable for me due to the extra work it’s creating.

Any thoughts would be much appreciated.

0 Likes

#2

You have probably installed some plugin that does that, maybe the EditorConfig plugin.

0 Likes

#3

Hey, @svenax -

This happens across projects, but where I’m currently working, the only .editorConfig file in the project lives outside any directory I’m working in (i.e. nowhere in the directory hierarchy) and defines this config:

root = true

*]

indent_style = space
indent_size = 2

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = false

What seems to be happening is that my actually hitting the Tab key injects a tab and then the next time I save, Sublime assumes the hard tab should be used throughout and converts the whole document.

0 Likes