Sublime Forum

Whitespace Trimming on Save Not Working

#1

This option doesn’t seem to function:

"trim_trailing_white_space_on_save": false,

Despite the setting, white space is trimmed, which is a major bother for me and would be nice to have again (I don’t know when it stopped working but it was a while ago). Following is the section of my options settings containing the above command in case there is a dependency I am not aware of.

"save_on_focus_lost": true,
"spell_check": true,
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": false,
"trim_trailing_white_space_on_save": false,
"use_tab_stops": false,
"wrap_width": 70

Can anybody confirm that the whitespace trimming option is broken and whether it is listed as a bug? Thanks much.

Tom

0 Likes

#2

It seems to be working fine here (tested on Windows, Mac and Linux). Does it not work for all file types? Perhaps you have a per-syntax setting for some files that is overriding what this setting is doing?

1 Like

#3

Thanks. Further tests point to the AsciiDoc(AsciiDoctor) syntax plugin (if that’s the right term). I added the following command to Package Settings | Asciidoctor | Settings-User and the problem went away. Thank you very much for your reply! Here is the user settings:

{
“extensions”:
[
“txt”,
“adoc”
],
“trim_trailing_white_space_on_save”: false,
}

1 Like