+2
Corrigé

My specified tab_size gets overridden incorrectly

Rob Speer il y a 14 ans mis à jour par Jon Skinner il y a 14 ans 0
I'm editing Python code, and my Python settings have "tab_size": 4. Sublime Text doesn't always listen to this, and I think it has to do with the size of the first indentation in the file.

For example, if I have an import list wrapped onto multiple lines, with 20 spaces at the start of the next line to line up with "from module import (", it seems that Sublime Text takes this as an indication that I didn't really want 4-space indents, and it uses 8-space indents instead. Even though the rest of the file uses 4-space indents and now I can't get to half of the tab stops.

At least it doesn't use 20-space indents, but inappropriate 8-space indents are still frustrating.

Solution

+1
Solution
Corrigé
This will be the indentation detection guessing wrong. You can disable indentation detection: http://www.sublimetext.com/docs/2/indentation.html
+1
Solution
Corrigé
This will be the indentation detection guessing wrong. You can disable indentation detection: http://www.sublimetext.com/docs/2/indentation.html