I would definitely love to see this, probably for all languages. Is there anyone who want want trailing whitespaces left? If so, at least have it be an option where one can enable or disable it so it removes trailing white space when you save the file or something.
This should probably be disabled for Markdown for example, because trailing whitespace has meaning in Markdown: two spaces at the end of a line insert a <br> tag. (see https://spec.commonmark.org/0.31.2/#hard-line-breaks)
So maybe, it's better to have a list of file extensions for which this feature would be enabled? Similar to the existing Settings -> New File -> Preferred File Extensions.
Maybe turn it on globally or only for specific file extension? Or even smarter: Turn off / on globally and then make it possible to exempt certain file settings as per file type? Globally on, but markdown is exempt: Markdown will not be tripped. Globally off, but C code ix exempt: C will be stripped. But maybe that is just to much magic :)
I would definitely love to see this, probably for all languages. Is there anyone who want want trailing whitespaces left? If so, at least have it be an option where one can enable or disable it so it removes trailing white space when you save the file or something.
I fully agree. Not having this option is currently a downside of this editor.
Are there any settings you would like to see for this feature? Or just enabled/disable?
Imo, turning it on or off would be enough. And I think it should be off by default, as this is the current behaviour.
This should probably be disabled for Markdown for example, because trailing whitespace has meaning in Markdown: two spaces at the end of a line insert a
<br>
tag. (see https://spec.commonmark.org/0.31.2/#hard-line-breaks)So maybe, it's better to have a list of file extensions for which this feature would be enabled? Similar to the existing Settings -> New File -> Preferred File Extensions.
Maybe turn it on globally or only for specific file extension? Or even smarter: Turn off / on globally and then make it possible to exempt certain file settings as per file type? Globally on, but markdown is exempt: Markdown will not be tripped. Globally off, but C code ix exempt: C will be stripped. But maybe that is just to much magic :)