48
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Visual Studio Codeで保存時に行末尾の空白を自動で消す

Posted at

Lintを有効にしていたりすると空白のみの行や末尾の空白を自動で指摘してくれるが、
消してくれなくてイラッとしたので自動で消すようにする方法を調べた

Story_ts_-_kanban.png

Visual Studio Codeの設定に以下を追加すると保存時に自動で消してくれるようになる。

"files.trimTrailingWhitespace": true

また、コマンド入力(macなら shift+command+p で呼び出せる)で以下のコマンドを実行すると手動で消すことも出来る。

Trim Trailing Whitespace

48
28
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
48
28

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?