I want to create an snippet when triggered it will surround the given text. Currently my snippet is:
{
\"Function Creator Helper\": {
\"prefix\": \"_w
${TM_SELECTED_TEXT}
does not work for me either.
${selectedText}
has been added as a Snippet Editor Variable:
https://github.com/Microsoft/vscode/pull/39483#issuecomment-383552677
Example:
"JS Block Quote": {
"prefix": "c2",
"body": [
"/* ${selectedText} */",
],
"description": "JS Block Quote"
}
At this time it is not correctly documented: https://code.visualstudio.com/docs/editor/userdefinedsnippets#_variables
NOTE: In a multi-line selection, ${selectedText}
is truncated to the first line. An alternative is to use the the clipboard and the ${CLIPBOARD}
variable.
An extra step :(