LoginSignup
42
24

More than 5 years have passed since last update.

VisualStudioCodeでMarkdownの時だけ末尾の空白をトリミングしない方法

Last updated at Posted at 2017-09-12

Visual Studio Code で Markdown を書くようになりました。
私は設定で末尾の空白は自動で削除してくれるように設定をしています。

// 有効にすると、ファイルの保存時に末尾の空白をトリミングします。
"files.trimTrailingWhitespace": true,

ただ、この設定をしていると Markdown の改行スペースが削除されてしまう……。
なので、下記の記述を追加します。

// Markdownの場合は空白トリミングは実施しない
"[markdown]": {
    "files.trimTrailingWhitespace": false
}

これで Markdown の時だけ末尾の空白が削除されないようになります!

42
24
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
42
24