snippets icon indicating copy to clipboard operation
snippets copied to clipboard

Support prefix

Open chrisgoffinet opened this issue 2 years ago • 0 comments

Just like when defining User Snippets in VSCode, it would be helpful if this extension supported prefix.

{
    "Insert heading level 1": {
       "prefix": "heading1",
       "body": ["# ${1:${TM_SELECTED_TEXT}}$0"],
       "description" : "Insert heading level 1"
    }
}

The prefix property defines the trigger phrase for the snippet. It can be a string or an array of strings (if you want multiple trigger phrases). Substring matching is performed on prefixes, so in this case, typing "h1" would match our example snippet.

chrisgoffinet avatar May 15 '22 22:05 chrisgoffinet