本文翻译自:Remove trailing spaces automatically or with a shortcut
Is there a way to remove trailing spaces in Visual Studio Code (automatically or with a shortcut)? 有没有一种方法(自动或使用快捷方式)删除Visual Studio Code中的尾随空格?
I've been looking for this in the command palette and in the editor settings, but I cannot find what I am looking for. 我一直在命令面板和编辑器设置中寻找它,但是找不到我想要的东西。
#1楼
参考:https://stackoom.com/question/25aN9/自动或使用快捷方式删除尾随空格
#2楼
You can enable whitespace trimming from settings: 您可以通过设置启用空白修剪:
- Open VS User