Faster coding with Zen Coding

Posted by HTML-Kit Support September 24, 2012
 

This feature was delivered in HTML-Kit Tools update 20121101. To make sure that you have the latest additions, select "Help > Check for Updates" from the main menu.

I'm happy to announce that Zen Coding is now supported in HTML-Kit Tools!

Zen Coding, which is now called Emmet, is a popular choice for high speed coding written by Sergey Chikuyonok.

Imagine typing a CSS selector-like expression and expanding it to HTML code. So instead of typing all of this code:

<h1></h1>
<div id="content">
<ul id="mylinks">
<li><a href="">Link 1</a></li>
<li><a href="">Link 2</a></li>
<li><a href="">Link 3</a></li>
</ul>
</div>

you can type the following line and press Ctrl+E to quickly generate the HTML:

h1+div#content>ul#mylinks>li*3>a[href]{Link $}

That particular expression was used to demonstrate the power of Emmet expressions. If you're new to Emmet, try typing a tag name like DIV:

div

and pressing Ctrl+E to expand it to:

<div>|</div>

Now try this:

ul>li*5

Ctrl+E expands it to the following unordered list with 5 items:

<ul>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>

Looks fun and useful? You can read more about the syntax of Emmet expressions here.

Thank you Sergey, for your efforts on Emmet.

comments powered by Disqus