这里以go语言为例
一:打开vscode
二:
按住 ctrl+shift+p
输入 snippets
单机首选项
三:
四:
prefix:你需要快捷输入的代码 我这里去go的缩写
body:根据prefix的代码 就会显示 body的内容
descriptiong:对prefix进行描述 方便其他人查阅
五:golang常用模板:
"pln":{ "prefix": "pln", "body": "fmt.Println($0)", "description": "fmt换行打印" }, "plf":{ "prefix": "plf", "body": "fmt.Printf(\"$0\\n\",)", "description": "fmt格式化打印" }