Is there a way to remove trailing spaces in Visual Studio Code (automatically or with a shortcut)?
I've been looking for this in the command palette and in the editor settings, but I cannot find what I am looking for.
You can enable whitespace trimming at file save time from settings:
"files.trimTrailingWhitespace": true
setting to the User Settings document if it's not already there. This is so you aren't editing the Default Setting directly, but instead adding to it.We also added a new command to trigger this manually (Trim Trailing Whitespace from the command palette).