插件

  1. 自动提示路径插件AutoFileName
  2. 代码美化Beautifyvetur
  3. vue代码片段自动提示Vue2 Snippets
  4. es6代码提示 JavaScript(ES6) code snippets
  5. 代码规范检查器 Eslint

设置

  1. 新建文件输入vue回车自动创建vue模板
    首选项–用户代码片段–vue.json
    输入
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    {
    "Print to console": {
    "prefix": "vue",
    "body": [
    "<template>",
    " <div></div>",
    "</template>",
    "",
    "<script>",
    "export default {",
    " data () {",
    " return {",
    " };",
    " },",
    "",
    " components: {},",
    "",
    " computed: {},",
    "",
    " mounted() {},",
    "",
    " methods: {}",
    "}",
    "",
    "</script>",
    "<style lang='scss' scoped>",
    "</style>"
    ],
    "description": "Log output to console"
    }
    }
  2. 保存自动格式化代码
    设置formatOnSave为true
    具体链接