VS code 使用技巧

来源:互联网 发布:不要网络的大型游戏 编辑:程序博客网 时间:2024/06/07 03:32

VS code使用经验汇总

模板设置

vscode的模板设置在代码段里面设置步骤如下:
crtl+shift+p ,然后输入snippet,在里面查找vue(例子是vue),然后就可以在里面输入代码段了
vue的模板文件为:

{    "Print to console": {        "prefix": "vue",        "body": [            "<template>",            " <div class=\"page\">\n",            " </div>",            "</template>\n",            "<script type=\"text/ecmascript-6\">",            " export default {",            "   data() {",            "     return {\n",            "     }\n",            "   },",            "   components: {\n",            "   }",            " }",            "</script>\n",            "<style scoped lang=\"stylus\">\n",            " ",            "</style>",            "$2"        ],        "description": "Log output to console"    }}

保存设置后,新建一个vue后缀名的文件,在文件里面输入vue,然后按tab键即可。

原创粉丝点击