小小学习了下vscode的代码模板使用,还是比较简单的,双引号"
记得只用转义字符即可\
,需要添加指标法的地方,在引号里面加就可以,其实这个body就是连续输出字符串.
直接上代码
{// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope // is left empty or omitted, the snippet gets applied to all languages. 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": {// "scope": "javascript,typescript",// "prefix": "log",// "body": [// "console.log('$1');",// "$2"// ],// "description": "Log output to console"// }"vuehtml": {"scope": "javascript,typescript,html","prefix": "vuehtml","body": ["<!DOCTYPE html>","<html lang=\"en\">","<head>"," <meta charset=\"UTF-8\">"," <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">"," <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">"," <script src=\"https://cdn.jsdelivr.net/npm/vue/dist/vue.js\"></script>"," <title>lantern学前端</title>","</head>","<body>"," <div id=\"app\">"" $1"," </div>"""" <script>"," let vm = new Vue({"" el: \"#app\","" data:{"" $2"," }"" })"" </script>","</body>","</html>",],"description": "vuehtml"}
}