http://www.jedit.org/users-guide/indent.html#elastic-tabstops describes elastic tabstops.
There should be a distinction between standard tabSize and minimumTabSize for elastic
tabstops. Typically, minimumTabSize should be 1.
Consider a text file which is formatted like this:
"\tfoo\n#\tbar"
With :tabSize=2:indentSize=2:elasticTabstops=false:, it is rendered as
foo
# bar
(2 spaces before "foo", 1 space before "bar")
However, with :tabSize=2:indentSize=2:elasticTabstops=true: , it is rendered as
foo
# bar
(3 spaces before "foo", 2 spaces before "bar").
For compatibility with other tab stop interpretations, the result should also be
foo
# bar
(2 spaces before "foo", 1 space before "bar")
Thus,
either tabSize needs to be interpreted as "offset between two starts of non-whitespace"
also in elasticTabstops=true mode (as it does in elasticTabstops=false mode) instead
of being interpreted as "minimum number of characters between non-whitespace",
or the concept minimumTabSize should be introduced which allows to lower the "minimum
number of characters between non-whitespace" beyond the normal tabSize. The normal
tabSize applies when there is white space or the start of the file before a tab '\t'
(e.g. another tab or a line start), while the minimumTabSize applies when there is
non-white-space before a tab '\t'. This is much more compatible to the old fixed tab
stop system, where tabSize is a maximum offset, not a minimum offset and where the
effective minimum offset could be as small as 1.
Submitted | mediumnet - 2011-02-08 18:50:39 | Assigned | |
---|---|---|---|
Priority | 5 | Labels | editor core |
Status | open | Group | None |
Resolution | None |
2011-11-30 01:12:20 ezust |
- **assigned_to**: kpouer --> anshalmnit |
---|---|
2013-03-01 19:48:49 ezust |
- **assigned_to**: anshalmnit --> nobody |