sublime中html5的动态模板

如何查看特定文件的<scope>的值? ctrl+shift+alt+p,点击copy即可,将其粘贴到<scope里面即可>

粘贴到<scope>标签里面即可。

1、form表单

<snippet>
	<content><![CDATA[
<form action="${1}" method="${2}">
	${3}
</form>
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>form</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

2、input 标签

<snippet>
	<content><![CDATA[
<input type="${1}" name="${2}" value="${3}">
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>input</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

3、用户名输入框

<snippet>
	<content><![CDATA[
<label for="username">用户名:</label><input type="text" name="username" placeholder="请输入用户名" id="username"> <br>
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>username</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

4、密码输入框

<snippet>
	<content><![CDATA[
<label for="password">密码:</label><input type="password" name="password" placeholder="请输入密码" id="password"> <br>
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>password</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

5、性别单选框

<snippet>
	<content><![CDATA[
性别:<input type="radio" name="gender" value="male" checked>男
	 <input type="radio" name="gender" value="female">女 <br>
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>gender</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

6、复选框checkbox

<snippet>
	<content><![CDATA[
<input type="checkbox" name="${1}" value="${2}">
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>checkbox</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

7、文本输入框text

<snippet>
	<content><![CDATA[
<label for="${4}">${1}</label><input type="text" name="${2}" placeholder="${3}" id="${4}"> <br>
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>text</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

8、超链接标签a的快捷输入方式

<snippet>
	<content><![CDATA[
<a target="${1}" href="${2}">${3}</a>
]]></content>
	<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
	<tabTrigger>a</tabTrigger>
	<!-- Optional: Set a scope to limit where the snippet will trigger -->
	<scope>text.html.basic</scope>
</snippet>

 

实时更新中。。。。。。。。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值