Sublime Forum

Bug: Autoindent leaves spaces

#1

If you are at the end of an indented line and hit enter (which will cause a newly indented line to be inserted below), and then move away from the line without typing anything, the indentation will remain.

After hitting enter:

If you don’t type anything, the indentation will stay there. There is no reason for this.

This is with the “trim_automatic_white_space” pref set to true.

Latest dev build (2220).

0 Likes

#2

One more:

Hitting Enter there produces an arguably meaningless indent:

0 Likes

#3

you might want to set “trim_trailing_white_space_on_save”: true in your settings to get rid of those whitespace

0 Likes

#4

No, that is the wrong solution. Automatically trimming whitespace will screw up the history in version control systems such as Git.

0 Likes