Emacs Zen Coding - Write markup quickly
emacswiki.org
emacswiki.org
Is how fast I can write mark-up really bound by how many characters I have to type? For me at least, it's more bound by thinking, so I don't want to do anymore of that. And I don't even type that fast.
It also reminds me of HAML (discussed recently): http://news.ycombinator.com/item?id=925573
Looking at one aspect: The idea of abstracting the verbosity of HTML/XML by just stating the element name once (instead of both open and close tags) is not new. Many people have implemented this idea, but it doesn't seem to catch on. It could be that that very verbosity is a significant factor in the success of HTML and XML (both have widespread adoption).
SGML (the common ancestor of both HTML and XML) allowed a "</>" close tag, which goes part-way towards reducing verbosity, but it was deliberately omitted from HTML and XML. Both have been much more successful than SGML. Though it's hard to know what impact that particular omission had, greater abstraction is harder to read for newcomers, and therefore probably decreases adoptability...
Perhaps it's the Abstraction vs. Verbosity being played out in another forum e.g. Lisp abstraction being more powerful but Java verbosity being more popular.
<a href=../bar/index.html>Bar</a>
is actually shorthand for the invalid <a href="..">bar</a>index.html>Bar</a>
Good luck reading real world HTML with a browser that implements that correctly.
(And that is why the W3C validator so often complains about a closing A tag that is not open (or at least used to do). )I'm an emacs noob but it seems like the tools for actually working with existing markup are impoverished. You only write markup once; you have to maintain it forever.
Try `C-h m` to find out what commands your HTML editing mode provides. In HTML Mode, `C-c /` closes the current element, and in nxml mode, `C-c C-f` does the same thing. Even better, in nxml mode, when `nxml-slash-auto-complete-flag` is non-nil the current element is automatically closed when you type a "/".
The nice thing about Emacs is that it's pretty trivial to write a little elisp code to add the other functionality you're looking for.