0

Only trim trailing whitespace on lines that are not empty

Holger Weis 12 aastat tagasi uuendaja Juha Mustonen 11 aastat tagasi 2
I have set trim_automatic_white_space to FALSE because I want to keep the indentation level on blank lines (e.g. after an if-statement). I also want any whitespace after non-empty lines to be automatically trimmed on save. Setting trim_trailing_white_space_on_save to TRUE will also remove the whitespace on empty lines (indentation level).

Is there a way to use trim_trailing_white_space_on_save TRUE with respect of trim_automatic_white_space FALSE?

Image 148

You can make a plugin that takes care of that to your likings.

According to plugin documentation, TrailingSpaces -plugin is capable to do exactly what you wanted (among of other things).