如何配置ZenCoding
在Sublime中按Ctrl+Shift+Enter弹出对话框 ->输入install->找到 Package Control:install Package ->待Package Control安装完后再输入ement(Zen Coding已改名为ement) 即安装好了ZenCoding插件
使用: 配置环境好之后按ctrl + alt + enter键, 会有输入框, 然后往里面输入快捷代码即可快速生成希望的html代码
规则如下(粘贴自http://code.google.com/p/zen-coding/wiki/ZenHTMLSelectorsEn):
Zen HTML Selectors
E#name
div#name
<div id="name"></div>
E.name
div.name
<div class="name"></div>
div.one.two
<div class="one two"></div>
div#name.one.two
<div id="name" class="one two"></div>
E>E
head>link
<head>
<link/>
</head>
table>tr>td
<table>
<tr>
<td></td>
</tr>
</table>
ul#name>li.item
<ul id="name">
<li class="item"></li>
</ul>
E+E
p+p
<p></p>
<p></p>
div#name>p.one+p.two
<div id="name">
<p class="one"></p>
<p class="two"></p>
</div>
E[attr]
Added in v0.6
p[title]
<p title=""></p>
td[colspan=2]
<td colspan="2"></td>
span[title="Hello" rel]
<span title="Hello" rel=""></span>
E|filter
Added in v0.6
p.title|e
<p class="title"></p>
Read Filters for more info
E*N
p*3
<p></p>
<p></p>
<p></p>
ul#name>li.item*3
<ul id="name">
<li class="item"></li>
<li class="item"></li>
<li class="item"></li>
</ul>
E*N$
p.name-$*3
<p class="name-1"></p>
<p class="name-2"></p>
<p class="name-3"></p>
select>option#item-$*3
<select>
<option id="item-1"></option>
<option id="item-2"></option>
<option id="item-3"></option>
</select>
E+
ul+
<ul>
<li></li>
</ul>
table+
<table>
<tr>
<td></td>
</tr>
</table>
dl+
<dl>
<dt></dt>
<dd></dd>
</dl>
html:4t 可以得到标准的html整个格式标签