Home Download Buy Blog Forum Support

Detect Indentation incorrectly guessing 2-space tabs

Detect Indentation incorrectly guessing 2-space tabs

Postby ianstormtaylor on Fri Feb 03, 2012 10:50 pm

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:

Code: Select all
//
// 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
ianstormtaylor
 
Posts: 10
Joined: Wed Jan 18, 2012 3:17 pm

Re: Detect Indentation incorrectly guessing 2-space tabs

Postby ianstormtaylor on Mon Feb 06, 2012 10:16 pm

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.
ianstormtaylor
 
Posts: 10
Joined: Wed Jan 18, 2012 3:17 pm


Return to Technical Support

Who is online

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