Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add zen-coding to html-mode. Expand css to html with C-c C-j

 Example:

    .mod>.bd>h2+p

 C-c C-j

    <div class="mod">
        <div class="bd">
            <h2></h2>
            <p>
            </p>
        </div>
    </div>
  • Loading branch information...
commit f6eb337aa83a10a938fc1ff8dbb00fc6987db414 1 parent 5dc0ea6
@magnars authored
Showing with 15 additions and 4 deletions.
  1. +7 −4 .gitmodules
  2. +7 −0 init.el
  3. +1 −0  site-lisp/zencoding
View
11 .gitmodules
@@ -86,8 +86,11 @@
path = site-lisp/ido-ubiquitous
url = https://github.com/DarwinAwardWinner/ido-ubiquitous.git
[submodule "site-lisp/buster-mode"]
- path = site-lisp/buster-mode
- url = https://github.com/magnars/buster-mode.git
+ path = site-lisp/buster-mode
+ url = https://github.com/magnars/buster-mode.git
[submodule "site-lisp/ruby-end"]
- path = site-lisp/ruby-end
- url = https://github.com/rejeep/ruby-end.git
+ path = site-lisp/ruby-end
+ url = https://github.com/rejeep/ruby-end.git
+[submodule "site-lisp/zencoding"]
+ path = site-lisp/zencoding
+ url = https://github.com/rooney/zencoding.git
View
7 init.el
@@ -76,6 +76,13 @@
(require 'wgrep)
(require 'smart-forward)
+;; Expand css-like selectors to html
+(require 'zencoding-mode)
+(add-hook 'sgml-mode-hook 'zencoding-mode)
+(define-key zencoding-mode-keymap (kbd "C-j") nil)
+(define-key zencoding-mode-keymap (kbd "<C-return>") nil)
+(define-key zencoding-mode-keymap (kbd "C-c C-j") 'zencoding-expand-line)
+
;; Predictive abbreviations while typing - an experiment (tab to complete)
(require 'pabbrev)
(pabbrev-mode 1)
1  site-lisp/zencoding
@@ -0,0 +1 @@
+Subproject commit fc15836a9da44ad5bd7954de28c5549b4feedbaf
Please sign in to comment.
Something went wrong with that request. Please try again.