Home Download Buy Blog Forum Support

Tab size defaults to 2

Tab size defaults to 2

Postby janzich on Sat Jun 12, 2010 2:03 pm

I have a simple .inc file with a mixture of ASP and HTML. In fact, it's just few lines of ASP wrapped in <% %>. The problem is that tabSize seems to default to 2 no matter what I do or set. I have no per file settings anywhere; I only have set:

Code: Select all
translateTabsToSpaces true
tabSize 4

in my user settings. It is working in all cases except this particular file. It almost seems that there is something wrong with the file. I tried to delete various portions of the file, and I think at one point I managed to get 4 spaces per tab, but there was nothing suspicious in the section I deleted. Also, I removed the inc extension from all packages, and it still behaved the same even if the file was threated as plain text.

Edit: I just found out what was that probably. The file in question was already formatted with two-space indentation, and Sublime was probably being smart as guessed that. I just noticed that there is a "Guess indentation from buffer" function. Is there a way to turn it off (in case I need it)?

Edit 2: OK, this is embarrassing. I found the settings. It's called detectIndentation. I could not find it before, because I did not realize my search was set to "full words" and "case sensitive". I guess this post will stay here as a manifestation of a moment of stupidity.
Posts: 1
Joined: Sat Jun 12, 2010 2:01 pm

Re: Tab size defaults to 2

Postby edanm on Sat Jun 12, 2010 4:31 pm

That's ok... the same thing happened to me 2 weeks ago.

Maybe Sublime could give some kind of message saying this happened, so others don't get confused? I'll once again mention the "message" api I'd like Sublime to have (mentioned in the Feature Requests forum).
Posts: 131
Joined: Thu Mar 04, 2010 11:05 pm

Return to Technical Support

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot], Yahoo [Bot] and 25 guests