Sublime Forum

Potential Bug: Sublime too aggressively deletes extra spaces

#1

If I have this code and a 2 space indent in javascript:
[space]while(x[space]<[space][space][cursor]42) {};

If I press backspace, sublime will delete both spaces. This might make sense at the end or beginning of a line, but does it make sense in the middle of a line? Perhaps it does, but I find it annoying more often than not. Also, it looks like this depends on the tab size as well. For instance, if the above code is indented 0 or 2 spaces, you won’t see the problem. This probably also means it is a bug.

0 Likes

#2

The use_tab_stops setting controls this

0 Likes

#3

Sorry, I should have looked for that first. It’s still a little weird that it does the same in the middle of the line. The idea I think is so that soft tabs can behave like normal tabs, but how many people are really going to have a tab in the middle of a line? Even with that setting on, it seems weird that it would behave that way in the middle of a line.

0 Likes