VScode快速生成Vue模板

在这里插入图片描述
在这里插入图片描述

复制以下内容

{
	// Place your snippets for vue here. Each snippet is defined under a snippet name and has a prefix, body and 
	// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
	// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the 
	// same ids are connected.
	// Example:
	// "Print to console": {
	// 	"prefix": "log",
	// 	"body": [
	// 		"console.log('$1');",
	// 		"$2"
	// 	],
	// 	"description": "Log output to console"
	// }

	"Print to console": {
        "prefix": "sca",
        "body": [
            "<template>",
				"",
			"</template>\n",


			"<script>",
			"export default {",
			"",
			"}",
			"</script>",
			"",

			"<style>",
			"",
            "</style>",

        ],
        "description": "vue code autocompletion"
    }

}

这里prefix后面的sca代表你输入sca就会自动补全代码,可根据需要更改
description为描述内容
在这里插入图片描述


代码整行移动 Alt + 方向键
代码整行复制 Shift+ Alt + 方向键


当前主题
在这里插入图片描述

在这里插入图片描述


插件

vetur

  • 语法高亮
  • Snippet
    在这里插入图片描述
    输入对应的lang出现相应的syntax
    Vue模板就是简单的html、js、css   如下图输入js就会
    在这里插入图片描述
  • 错误检测

eslint
eslint帮助我们检查JavaScript编写时的语法格式错误,以规范代码结构、代码风格,可自定义检查规则,对于团队的协作、代码review有至关重要的作用。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章