vs code中写html要调哪些设置,vs code中设置html5 快速生成模板

按英文的!和h:5都可以快速生成html模板,但是找了半天都找不到如何修改模板设置。只好自己从snippets里重新编写了一个html5的模板,以免自己以后忘了。

首先打开 snippets

bVbvmxz?w=906&h=587

然后输入以下代码段:

{

// Place your snippets for html 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"

// }

"Html5-Vue": {

"prefix": "vh",

"body": [

"",

"\n",

"

",

"\t",

"\t",

"\t",

"\t

Document",

"\t",

"\n",

"

",

"\t

$1
\n",

"\t

"\t\tvar vm = new Vue({",

"\t\t\tel: '#app',",

"\t\t\tdata: {},",

"\t\t\tmethods: {}",

"\t\t});",

"\t",

"\n",

""

],

"description": "快速创建在html5编写的vue模板"

}

}

这里的 “prefix”: “vh”,指的是你自定义的快捷代码,这里我输入h就会出现快速生成代码提示,也可以自定义其他字段。

bVbvmxK?w=796&h=291

效果如下:

bVbvmXT?w=629&h=474

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值