Sublime Forum

use_tab_stops not functioning properly

#1

As of ST2 2.0.1 (build 2217) the use_tab_stops setting no longer functions properly for me.
Using the following Python-specific settings:

{
    "tab_size": 4,
    "translate_tabs_to_spaces": true
}

Although pressing tab continues to insert the proper amount of spaces up to the next tab stop, backspace no longer deletes to the last tab stop.
Changing “use_tab_stops” in default, user, and Python-specific settings files seems to have no affect.
I can revert to 2.0.0 (build 2210) and everything works fine again.
Running in Windows 7 x64.

Edit: I refer to my Python specific settings because I was writing Python when I noticed the problem.
However, this problem seems to exist regardless of what syntax that ST2 is set to.

0 Likes

#2

Same here. The bug appeared in 2213, and it occurs when there is text before the cursor on the line.

Example (| is the cursor, tabstop 4, using spaces):

foo     |bar

In 2212 pressing delete results in:

foo |bar

In 2213 and later, we get:

foo    |bar
0 Likes

#3

use_tab_stops was changed such that backspace will delete to the next tabstop only if there’s whitespace from the beginning on the line to the caret: this is less surprising behavior in general. Unfortunately, there’s no setting that will restore the previous behavior.

0 Likes

#4

Ahh, that make sense then.
Although I totally understand why backspace normally wouldn’t match tab stops in the middle of a line, I actually use it to position end of line comments most of the time.
Is there any possibility of adding in a small setting that allows this functionality?

0 Likes

#5

For me this is surprising, even though other text editors have the same behavior. Can you please give us a setting so we can at least decide which behavior we prefer?

0 Likes