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

How to replace variable in Visual Studio Code ? (snippet)

$
0
0

I use javascript snippet with key binding.

so I have this code below

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

so if I type "box" and than press "alt+c", It give...

box const box = 

But I expected

const box =

So,How can I achieve that ?


Viewing all articles
Browse latest Browse all 98651

Latest Images

Trending Articles



Latest Images