Zencoding is like a macro system, with his own sintax, to write repetitve parts of web languages without the pain.
For example, "html:xs" give this XHTML 1.0 header and skeleton as result:
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<title></title>
</head>
<body>
</body>
</html>
This will show more of the time saving part, this time just used as a cli tool:
Code: Select all
echo 'ul > li.item-$*5' | ./sparkup
<ul>
<li class="item-1"></li>
<li class="item-2"></li>
<li class="item-3"></li>
<li class="item-4"></li>
<li class="item-5"></li>
</ul>
To make it work in Geany, I just set-up a custom command that send selected text trough sparkup and replace it by the result (CTRL+Z if something went wrong).
1-Just in case, I made a pet only with the python script which will be instaled in ~/my-applications/bin. Install it, or grab all from github and place the main sparkup.py script somewhere into your path.
2-In Geany, go to 'Edit->Format->Send Selection to' (I have it in Spanish, not sure if its exactly like that) and you'll see '1:, 2: , etc". Add this to a free number:
Code: Select all
sparkup 2> /dev/null
*Same applies to other tools, like the magnificent perl tidy.
Hope you enjoy it as I do.
Regards.