{
"Snippet Name": {
"scope": "specifies scope language for snippets in global files",
"prefix": "the prefix you'd put in to trigger an insert",
"body": [
"${SYSTEM_VARIABLE}",
"$1",
"text"
]
"description": "Human readable description goes here."
}
}
The basic layout of a snippets file. (Can be created by using Ctrl+Shift+P and searching/selecting Configure Snippets)
Scope value: Usually full name of language or context, examples "markdown" or "python", can be comma separated to specify multiple of them.
Body value: Can be just quotes or can be multiple, comma-separated quotes within [square brackets] for multiline snippets.
${SYSTEM_VARIABLE}: How you'd put in a system variable. For instance ${CURRENT_HOUR} would input the current hour when the snippet is used.
$1: Dollar signs proceeded by numbers indicate tab stop order after inserting the snippet. So if you have more than one tab stop, you can put in $1, $2, $3 and so forth as needed. |