vscode相关设置

一.如何设置vs每次点击文件打开新的窗口


1.打开设置

2.搜索:"workbench.editor.enablePreview"

3.设置"workbench.editor.enablePreview": false

二.设置.vue文件代码段


1.首选项 ->用户代码段 ->vue.json

2.插入代码

 1 {
 2     "Print to console": {
 3         "prefix": "vue",
 4         "body": [
 5             "<template>",
 6             "</template>
",
 7             "<script>",
 8             "export default {",
 9             "  name:'',",
10             "  data() {",
11             "      return {
",
12             "      };",
13             "  },",
14             "};",
15             "</script>
",
16             "<style scoped>
",
17             "</style>
",
18         ],
19         "description": "Create vue template"
20     }
21 }

三.解除使用v-for报错的提示


1.用户设置-> 搜索vetur.validation.template

2.将其设置为false

 四.将缩进设置为2格


首选项 ->设置->  1.搜索tabsize设置为2       2.将"editor.detectIndentation"设置为false

原文地址:https://www.cnblogs.com/JCDXH/p/11402548.html