Permalink
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...
1 parent 5dc0ea6 commit f6eb337aa83a10a938fc1ff8dbb00fc6987db414 @magnars committed Jul 10, 2012
Showing with 15 additions and 4 deletions.
  1. +7 −4 .gitmodules
  2. +7 −0 init.el
  3. +1 −0 site-lisp/zencoding
View
@@ -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
@@ -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)
Submodule zencoding added at fc1583

0 comments on commit f6eb337

Please sign in to comment.