Home Download Buy Blog Forum Support

Tab spacing behaviour inconsistent

Tab spacing behaviour inconsistent

Postby darrenm on Thu Oct 25, 2012 7:50 am

In my user settings I have the following:

Code: Select all
    "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!
darrenm
 
Posts: 5
Joined: Tue Dec 13, 2011 11:15 am

Re: Tab spacing behaviour inconsistent

Postby darrenm on Thu Oct 25, 2012 7:55 am

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?
darrenm
 
Posts: 5
Joined: Tue Dec 13, 2011 11:15 am

Re: Tab spacing behaviour inconsistent

Postby adzenith on Thu Oct 25, 2012 10:22 pm

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).
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm

Re: Tab spacing behaviour inconsistent

Postby darrenm on Mon Oct 29, 2012 1:19 pm

Do you know what that setting is called? I searched the defaults file for autodetect but no matches.
darrenm
 
Posts: 5
Joined: Tue Dec 13, 2011 11:15 am

Re: Tab spacing behaviour inconsistent

Postby adzenith on Mon Oct 29, 2012 9:26 pm

// Set to false to disable detection of tabs vs. spaces on load
"detect_indentation": true,
adzenith
 
Posts: 1217
Joined: Mon Oct 19, 2009 9:12 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Juje007 and 34 guests