10
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCode における Markdown カスタマイズ備忘録

Posted at

VSCode でのライティングを快適にするため、.vscode/ で設定するエディタの外観と入力を最適化する。

1. settings.json の設定

エディタの挙動を言語ごとに制御。他の言語にMarkdownの特殊設定の影響が出ないようにする。

{
    "[markdown]": {
        "editor.snippetSuggestions": "top",
        "editor.suggest.showWords": false,
        "editor.wordWrap": "on",
        "editor.lineNumbers": "off",
        "editor.glyphMargin": false,
        "editor.unicodeHighlight.invisibleCharacters": false
    },
}
  • "editor.snippetSuggestions": "top" ... スニペットを優先的に表示
  • "editor.suggest.showWords": false ... 単語補完(辞書)をオフにしてノイズを減らす
  • "editor.wordWrap": "on" ... 折り返しを有効化
  • "editor.lineNumbers": "off" ... 行番号を非表示にして集中力を高める
  • "editor.glyphMargin": false ... 左端の余白を消す
  • "editor.unicodeHighlight.invisibleCharacters": false ...不可視文字の警告を抑制

2. md.code-snippets の設定

定型文や Markdown 記法を素早く呼び出すための設定。
MkDocs など静的サイトジェネレーターなどで使われる独自の記法などにも対応できる。

{
  "Toggle": {
    "prefix": "toggle",
    "body": [
      "<details>",
      "<summary>$1</summary>",
      "",
      "$2",
      "</details>"
    ],
    "description": "トグル"
  }
}

3. 設定のポイント

  • スニペット優先度 (top): .vscode/settings.jsonsnippetSuggestionstop にすることで、独自の定型文が変換候補の先頭に来るようになり、入力速度が向上
  • 視覚的ノイズの除去: lineNumbers: offglyphMargin: false は、コードを書く時とは異なり「文章」として全体を俯瞰しやすくする効果がある
10
14
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
10
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?