1、文件->首选项->用户片段
2、如果新建vue模板,就输入vue搜索vue.json如图
vue.json文件中放如下内容
{
"Print to console": {
// 前缀 也就是用户输入的快捷键内容
"prefix": "vue",
// 输出内容
"body": [
"<template>",
" <div>",
"",
" </div>",
"</template>",
"",
"<script>",
"export default {",
" data () {",
" return {",
" }",
" }",
"}",
"</script>",
"",
"<style scoped>",
"",
"</style>",
""
],
// 描述
"description": "Log output to console"
}
}
3、安装Vuter插件,用来识别vue文件
4、模板的使用:新建vue文件
输入vue提示如图
按tab键或者回车键都可,结果如下图