Open ottopic opened 5 years ago
what about
"customprintr": {
"prefix": "customprintr",
"body": [
"\t \\$printMe = ${TM_SELECTED_TEXT}; "
],
"description": "Insert custom print_r"
}
"macros": {
"printr": [
"editor.action.smartSelect.grow",
{
"command": "editor.action.insertSnippet",
"args": {
"name": "customprintr",
"langId": "php",
}
},
"editor.action.insertLineAfter",
]
},
?
Hello, I'm using macro to insert custom snippet from selected var in newline.
My snippet is:
and my macro is:
The problem is that after macro execution my clipboard is changed. My goal is obtain the same thing without change my clipboard, using for example ${TM_SELECTED_TEXT} in the snippet. I tried, but used with macro this variable is ignored.
Link to snippet variables https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets
Someone can help me?