Remove trailing spaces automatically or with a shortcut

后端 未结 7 1348
-上瘾入骨i
-上瘾入骨i 2020-12-07 07:12

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 edit

7条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-07 07:54

    In recent Visual Studio Code versions you can find settings here:

    Menu FilePreferenceSettingsText EditorFiles → (scroll down a bit) Trim Trailing Whitespace

    This is for trimming whitespace when saving a file.

    Or you can search "Trim Trailing Whitespace" in the top search bar.

提交回复
热议问题