Home Download Buy Blog Forum Support

TABs translates to spaces

TABs translates to spaces

Postby zgintasz on Tue Jan 01, 2013 10:26 pm

Hi,

I don't know, if it's a bug or something wrong. In some files, when I click TAB it makes 4 spaces instead of tab, in other files everything is fine. It just can't make tabs in some files, while in others it can. I've set translate_tabs_to_spaces to false. What can cause this?
I'm using win7 64bit, I can record the video if required.

Thanks.
zgintasz
 
Posts: 6
Joined: Sat Dec 29, 2012 8:38 pm

Re: TABs translates to spaces

Postby Clams on Wed Jan 02, 2013 5:31 am

It's not a bug it's a feature :P
Sublime Text auto-detect the indentation type of a file and will override your default setting.
If you don't want this behavior you can add "detect_indentation": false in your settings.
Clams
 
Posts: 50
Joined: Fri Dec 30, 2011 7:44 am

Re: TABs translates to spaces

Postby zgintasz on Wed Jan 02, 2013 2:00 pm

Clams wrote:It's not a bug it's a feature :P
Sublime Text auto-detect the indentation type of a file and will override your default setting.
If you don't want this behavior you can add "detect_indentation": false in your settings.


Oh, I thought it's a bug, thanks a lot :D.
zgintasz
 
Posts: 6
Joined: Sat Dec 29, 2012 8:38 pm

Re: TABs translates to spaces

Postby mikegleen on Fri Jul 05, 2013 3:34 pm

Just to clarify that I have the right idea:

If I want to turn off the detect_indentation heuristic and to enable translation of tabs to spaces for Python, I just need to create a file
Packages/Python/Python.sublime-settings with:

{
"detect_indentation": false,
"translate_tabs_to_spaces": true
}

Are there any other behaviors that will be affected? I am not saying that the auto detect is a bad thing - I'm just playing around with the features to get a feel for them.

Thanks.
mikegleen
 
Posts: 1
Joined: Fri Jul 05, 2013 2:59 pm


Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], TurnitinBot [Bot] and 15 guests