Remove trailing spaces automatically or with a shortcut

后端 未结 7 1313
-上瘾入骨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:40

    Not only can you change the Visual Studio Code settings to trim trailing whitespace automatically, but you can also do this from the command palette (Ctrl+Shift+P):

    You can also use the keyboard shortcut:

    • Windows, Linux: Ctrl+K, Ctrl+X
    • Mac: + k, + x.

    (I'm using Visual Studio Code 1.20.1.)

提交回复
热议问题