Cooper
Cooper

Reputation: 186

How to change default snippets in VSCode?

VSCode Version:1.20.1 OS Version:windows 10 1709 Steps to Reproduce:

1.When I input fun and press tab,this code will show.

function name(params) {
}  

2.I don't like this snippet.I want to change it, but I can not find a file about this snippet.

What should I do?

Upvotes: 3

Views: 1350

Answers (1)

Mark
Mark

Reputation: 181090

It is a default snippet but you can overwrite it. So assuming javascript, try this in your javascript.json file:

"Function no name": {
    "prefix": "fun",
    "body": [
        "function () {",
        "",
        "}"
    ],
    "description": "Function no name or parameters"
},

Gear icon/User Snippets/choose your language.

Upvotes: 2

Related Questions