Create a vue temlate for VsCode
Create a vue temlate for VsCode
File -> Preference -> User Snippets
New snippets file for "Folder Name"
Name:"vue.json"
{ "vue": { "prefix": "vue", "scope": "html", "body": [ "<!DOCTYPE html>", "<html lang=\"en\">\n", "<head>", "\t<meta charset=\"UTF-8\">", "\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">", "\t<meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">", "\t<title>Document</title>", "\t<script src=\"https://cdn.bootcss.com/vue/2.5.16/vue.js\"></script>", "</head>\n", "<body>", "\t<div id=\"app\">", "\t\t$1", "\t</div>\n", "\t<script>", "\t\tvar vm = new Vue({", "\t\t\tel: \"#app\",", "\t\t\tdata: {}", "\t\t})", "\t</script>", "</body>" ], "description": "init a vue template." } }
Test in a .html file:input "vue" - > Enter