0
0

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 1 year has passed since last update.

VSCodeで登録したMarkdownスニペットが出てこないときの解決方法

0
Posted at

はじめに

 Visual Studio Code(VSCode)は,ご存知の通り様々な言語に対応したエディタです.もちろん Markdown にも対応しています.
 多くのエディタでは頻繁に使用するコードのパターンを簡単に挿入できるスニペットという機能があり VSCode でも対応しています.しかし,Markdown では他の言語と同様の方法でスニペットを登録しても,編集中の候補として出てきません.
 ここでは,Markdown でスニペットを利用できるようにする方法について書いていきます.

解決方法

settings.jsonに以下のコードを挿入します.

  "[markdown]": {
    "editor.quickSuggestions": {
      "comments": "on",
      "strings": "on",
      "other": "on"
    }
  }

言語を指定する必要がなければこのようにしても良いです.

"editor.quickSuggestions": {
    "other": true,
    "comments": false,
    "strings": false
}

settings.jsonの開き方がわからない場合

この記事を参考にすると良いです.

settings.jsonへの挿入がわからないとき

この記事で json の書き方を把握すると良いです.

または以下を参考に

{
  // いろいろ書いてある
  ほげほげ, // なければ文末にカンマを挿入
  "[markdown]": {
    "editor.quickSuggestions": {
      "comments": "on",
      "strings": "on",
      "other": "on"
    }
  }
}

例えばこんな感じ.

{
  "editor.renderWhitespace": "all", // 半角スペースを可視化
  "[markdown]": {
    "editor.quickSuggestions": {
      "comments": "on",
      "strings": "on",
      "other": "on"
    }
  }
}

設定が波カッコや角カッコの入れ子の場合もあります.

{
  "[tex]": {
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.tabSize": 2
  },
  "[markdown]": {
    "editor.quickSuggestions": {
      "comments": "on",
      "strings": "on",
      "other": "on"
    }
  }
}
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?