First of all, how to add Zen coding plugins in Sublime Text2
Press CTRL + ' (that is ~ this key) to copy the following code to confirm the restart sublime Text2
Import urllib2,os;pf=' packagecontrol.sublime-package'ifelse None;o Pen (Os.path.join (IPP,PF),'wb'). Write (Urllib2.urlopen ('http:// sublime.wbond.net/'+pf.replace (','%20' ) )). Read ())
Restart see as shown in successful installation on behalf of the package Control
The next step is to temporarily share the grammar of Zen coding that you are not so familiar with.
1. Create a new HTML
Do not know how to create a new HTML page, how to enter the document declaration and head that a lump of things. Now with Zen Coding, you can instantly generate an HTML framework for the corresponding document declaration by typing in a few letters.
4.014.011.0 1.01.1)HTML: 5 (HTML5)
Then press ctrl+e, and you'll be able to create a new success
2. If you are familiar with CSS selectors, you can write HTML code efficiently with a short code similar to CSS selectors.
div#header>div#logo+ul.nav>li.item-$*5>a
Then click on the shortcut key Ctr+e, will automatically generate the following HTML code:
<div id="Header"> <div id="logo"></div> <ulclass="nav"> <liclass="item-1"><a href=""></a></li> <liclass="item-2"><a href=""></a></li> <liclass="item-3"><a href=""></a></li> <liclass="item-4"><a href=""></a></li> <liclass="item-5"><a href=""></a></li> </ul></div>
Some abbreviations that are commonly used in 3.head
Meta:utf, Meta:compatstyle, Link:css, Link:print, Link:favicon, Link:rss,script, SCRIPT:SRC
The above is only about the abbreviation of HTML, CSS abbreviations are more, it is recommended to view Zen Coding Small copy , learning CSS Zen Coding Way
RELATED links:http://rpsh.net/archives/zen-coding-npp/
http://www.cn-sass.com/blog/32.html
Quickly write HTML code in conjunction with Zen Coding (Sublime Text2 article)