+70
Indentation level setting (different from tab size)
Add some options to specify the indentation level (which is different from tab_size):
- indentation_size/indent_level (integer): number of spaces to use to indent code, which is not the same as "tab_size"
- compress_spaces_with_tabs_on_indentation (boolean): to specify that spaces should be converted to tabs when you reach a certain level of indentation (e.g. 8 spaces compressed to 1 tab if tab_size=8)
Служба підтримки клієнтів працює на UserEcho
This is a bad practice to change tab width to any value. It should be 8 chars long. Period.
You should separate indent stop and tab stop as separate settings.
Imagine we use both tabs and spaces to indent.
If John uses 8-column tab and uses 4-column indents then his code will look like this:
---
1st indent with 4 spaces
2nd indent with 1 tab (his editor settings set to replace spaces with tabs)
---
Now I open this text in awesome ST2 :)
My settings are:
---
// The number of spaces a tab is considered equal to
// Because I want 4-column indent
"tab_size": 4,
---
And what do i see? This text:
---
1st indent with 4 spaces
2nd indent with 1 tab (Bah!)
---
Actually solution is pretty straightforward: add setting
"indent_size": 4,
and you are done (i hope).
Only this missing feature stops me from using ST2 and purchase it (I have never imagined i would PURCHASE text editor for Linux with its tons of FREE editors).
Currently I use Kate under Ubuntu.
Actually I attach image with Kate indentation settings just to be more specific on this issue.
I see all of these on a regular basis:
A. Indent is 2 or 4 columns, no hard tabs allowed
B. Indent is 2 or 4 columns (mixed tabs and spaces), hard tabs are 8 spaces (common on Unix)
C. Indent is one hard tab, hard tab is 4 spaces (common on Windows)
D. Indent is one hard tab, make it whatever size you want
(Regardless of what the style "should" be, requesting that an entire project change their indentation because my editor doesn't support it has not gone over well in the past.)
Any word on when/whether this is likely to get implemented?
Many coding conventions call for different values for "unit of indentation" and "tab character size"; for example, the Java conventions state that a unit of indentation is four spaces, but tabs must be set at eight spaces:
http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-136091.html#262
Anyone know if this is fixed in ST3?
That's a shame. Thanks for looking into it.
A little bit late but has this been implemented yet? This is the last holdout before I am ready to switch... Current codebase is inconsistant and forcing indent to match tab spacing is a deal breaker