How to use snippets in comment and string

时间:2019-01-18 18:13:57

标签: visual-studio-code code-snippets

In Visual Studio Code, snippets is not work in comments or string. For example, I create snippet 't' for 'test', then type 't' in comment like

# t

or in string like

"this is a string t"

then there no suggestion and press 'tab' is not work.

How to use snippets in comment and string, in visual studio code?

1 个答案:

答案 0 :(得分:1)

User Setting中,输入以下内容:

"editor.quickSuggestions": {
    "comments": true,
    "strings": true
  },