Sublime Forum

Tab spacing behaviour inconsistent

#1

In my user settings I have the following:

    "translate_tabs_to_spaces": true,
    "tab_size": 4,
    ...

A project I’m working on seems to ignore this. Much of the time when I tab it remains as a tab. Some files this will give me two spaces, some four. Other files the tabs are translated to spaces as expected.

Totally lost - help!

0 Likes

#2

OK, I’ve just discovered the bar right at the bottom where you can specify these settings on a per-file bases. But how do I force it to adpot my user settings?

0 Likes

#3

There’s a third setting, that tells Sublime to guess which indentation to use on a per-file basis when opening an existing file. Those two settings you mentioned are only for new files (or for all files if you turn off autodetect).

0 Likes

#4

Do you know what that setting is called? I searched the defaults file for autodetect but no matches.

0 Likes

#5

// Set to false to disable detection of tabs vs. spaces on load
“detect_indentation”: true,

0 Likes