Sublime Forum

Detect Indentation incorrectly guessing 2-space tabs

#1

The problem I’m running into is that I always use 4-space tabs, but I also use the comma-first Javascript style. Here’s an example:

// // Page Component - View // define( 'jquery' , 'use!underscore' , 'use!backbone' ] ...

So the detect indentation is seeing the comma-first lines and guessing that the file using 2-space tabs instead of 4-space tabs. Would be awesome if it could be smart enough to realize that the commas are outdented.

Otherwise, I’m forced to either switch tab style, switch comma style, reset the tab size for each file, or turn off guessing. (I’d really rather not turn off guessing, because it’s super useful for collaborating with other Javascripters who use 2-space indents, or friends who use tabs instead of spaces.)

Thanks
Ian

0 Likes

#2

Also getting weird behavior where files are opening with 5 and 6-space tabbing, when as far as I can see everything is tabbed to 4-spaces.

0 Likes