Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97313

How to replace a variable in a snippet in Visual Studio Code?

$
0
0

I use javascript snippet with keybinding.

I have this code below:

    {
        "key": "alt+c", 
        "command": "editor.action.insertSnippet",
        "when": "editorTextFocus",
        "args": {
            "snippet": " const $TM_CURRENT_WORD = $1"
        }
    },

If I type box and than press alt+c, I get...

box const box = 

But I expected

const box =

How can I achieve that?


Viewing all articles
Browse latest Browse all 97313

Trending Articles