I just heard about zen-coding, which basically is just a script that generates markup based on a css-esque selector, ex:
div#foo > p*6
generates
<div id="foo">
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
<p></p>
</div>
Edit: Here's a more advanced example..
And PS - I'm not even going through any API, I'm totally guessing based on my CSS selector knowledge, this is very easy and intuitive for me.
ul#nav > li[id] * 6 > a
Generates
<ul id="nav">
<li id="">
<a href=""></a>
</li>
<li id="">
<a href=""></a>
</li>
<li id="">
<a href=""></a>
</li>
<li id="">
<a href=""></a>
</li>
<li id="">
<a href=""></a>
</li>
<li id="">
<a href=""></a>
</li>
</ul>
when you hit a shortcut such as Ctrl-E. Very very useful if you do a lot of front end development. I had the idea of the exact opposite, a CSS selector generator which basically parses markup and generates selectors so one can go in a tool such as Firebug and rapidly see live changes on the dot, I just never bothered to actually finish the script I had started.
It's currently supported in TextMate, Dreamweaver, Aptana, NetBeans, unfortunately not vim/emacs however there is a fork named sparkup which works on vim ( I use that now ).
I'm wondering if anyone has come across such plugins or tools in the past - I'm aware that there are snippet scripts in Vim/Textmate/Emacs and other powerful editors, just curious of what else is out there in the wild.