Zen Coding – Lazy Coding To The Extreme

With one arm out of action for the next few weeks anything I can do to type less is good.  A few days ago Zen Coding popped up on my radar and today I finally found a few minutes to tinker and try it out.

This is the holy grail of lazy typing! Basically it’s a plugin available for a host of popular editors.  And while they don’t mention Eclipse specifically they do mention Aptana.  Digging around on their wiki I found these helpful instructions:

  1. Install EclipseMonkey using update site: http://download.eclipse.org/technology/dash/update (you can skip this step if you have Aptana installed)
  2. Create top-level project in your current Eclipse workspace, name it, for example, zencoding
  3. Create scripts folder inside newly created project
  4. Extract contents of downloaded zip plugin into this folder. The project structure may look like this:
  5. Restart Eclipse/Aptana if needed

I did this on my vanilla Eclipse/CFEclipse/Aptana install and after a restart it worked!

I popped open a .cfm file and typed the following and then  clicked on the Scripts > Zen-Coding > Expand Abbreviation menu.


td*5

As I had seen that in some of the example and it immediately spit out


<td></td>
<td></td>
<td></td>
<td></td>
<td></td>

You can easily add more tags, ids/classes, etc. That is a very simple example.  There is a ton more stuff it can do:

Current features of abbreviation engine

It’s open source so extending it to support .cfm would be an interesting possibility!

The only drawback so far is some of the keyboard shortcuts don’t work in Eclipse but they are easily changed (see wiki).

With a ton of syntax shortcuts luckily there are several cheat-sheets available as well. But I can see this being a huge timesaver.  While I can mimic some of this with snippets and AutoHotKey – the dynamic nature of this plugin makes those pale in comparison.

Learn more: http://code.google.com/p/zen-coding/

Recent Related Posts

3 thoughts on “Zen Coding – Lazy Coding To The Extreme

  1. That does look like a neat tool, Jim! In regards to the one-handed typing, it’s not worth buying just for temporary use, but have you seen a FrogPad? It’s specifically designed for one-handed use, mainly as a portable keyboard device, but some people learn to use it to type with one hand and mouse with the other (less switching back and forth).

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>