首先找到用户代码片段的位置
![](https://img-blog.csdnimg.cn/20201105094443610.png#pic_center
在输入框中输入vue,然后选择vue.json或vue
打开之后是这样的
这些注释就是介绍怎么添加片段的
添加的例子如下
" 代表双引号
\n为换行
代码文字版为
"vue_eslint_template":{
"prefix": "v1", // 想要使用这块代码时输入
"body": [
"<template>",
"<div class=\"\"></div>",
"</template>\n",
"<script>",
"export default {\n",
"};",
"</script>\n",
"<style lang=\"scss\" scoped>\n",
"</style>\n"
],
"description": "vue严格模式模板" // 模板的描述
}
使用效果