LoginSignup
1
0

More than 1 year has passed since last update.

VScodeでユーザスニペットを登録する手順

Posted at

VScodeのスニペット登録手順

PC:macOS Monterey12.3
vscode:バージョン: 1.65.2

  1. ⌘+shift+p にて settings と入力して、"基本設定:設定(JSON)"を開く
  2. 以下を入力する

    "[markdown]": {                        //対応する言語を入力,以下は各種パラメータ
    "editor.wordWrap": "on",
    "editor.quickSuggestions": true,       //入力中に自動的に表示するかどうか
    "editor.snippetSuggestions": "top",
    }
  1. ⌘+shift+p にて snippet と入力して、"基本設定:ユーザスニペットの構成"をクリック((設定>ユーザスニペットでもOK))
  2. つづけて、markdown と入力して、markdown.json をクリック
  3. 以下の書式で入力する

  "スニペット名": {
    "prefix": "呼び出し名",
    "body": "入力される文字"
  }

⌘+shift+p にて insert snippet でもユーザスニペットに登録されている

参考:
https://qiita.com/c6tower/items/048c614a77a8f4311d71
https://code.visualstudio.com/docs/editor/userdefinedsnippets

1
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
1
0