Using TM_SELECTED_TEXT in my custom snippets

后端 未结 4 1187
醉话见心
醉话见心 2021-01-04 19:06

With the November 2016 (version 1.8) release of VSCode Snippet Variables are now supported, specifically TM_SELECTED_TEXT.

This makes me happy as I have used these h

4条回答
  •  孤街浪徒
    2021-01-04 19:49

    With the word highlighted, press F1 and run the command "Insert Snippet", then select your snippet on the list.

    Also you can edit your keybindings by going to File>Preferences>Keyboard Shortcuts and add some shortcut to the "editor.action.showSnippets" command, like this:

    {
        "key": "ctrl+alt+s",
        "command": "editor.action.showSnippets",
        "when": "editorTextFocus"
    }
    

提交回复
热议问题