一、只要输入两个【!!】就可以出来想要的代码片断。
比如:你看我,输入了两个感叹号,按下回车就出现如下代码:
2、选择【新建全局代码片段文件】
4、出现如下图所示
{ "html-js-vue-demo": { "scope": "html", "prefix":"!!", "body": [ "<!DOCTYPE html>", "<html lang=\"en\">", "", "<head>", "<meta charset=\"UTF-8\">", "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">", "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">", "<title>demo</title>", "</head>", "<script type=\"text/javascript\" src=\"vue.js\"></script>", "<body>", "<div id=\"box\">", "</div>", "</body>", "<script type=\"text/javascript\">", "var box = new Vue({", "el: \"#box\",", "data: {", "", "}", "})", "</script>", "", "</html>", ], "description": "html and vue model" } }
如果出现没有格式,按一下【alt】+【shift】+F,就会自动格式化了。