Skip to content

Commit

Permalink
Renamed zencoding -> emmet.
Browse files Browse the repository at this point in the history
  • Loading branch information
smihica committed Jun 23, 2013
1 parent 25be320 commit bbb8dab
Show file tree
Hide file tree
Showing 13 changed files with 996 additions and 995 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
memo*
memo*
*.elc
17 changes: 10 additions & 7 deletions Makefile
@@ -1,8 +1,8 @@
DST=zencoding-mode.el
DST=emmet-mode.el

all: zencoding-mode.el
all: emmet-mode.el emmet-mode.elc

zencoding-mode.el: src/snippets.el src/preferences.el src/*
emmet-mode.el: src/snippets.el src/preferences.el src/*
rm -f $(DST)
touch $(DST)
cat src/comments.el >> $(DST)
Expand All @@ -13,19 +13,22 @@ zencoding-mode.el: src/snippets.el src/preferences.el src/*
cat src/css-abbrev.el >> $(DST)
cat src/mode-def.el >> $(DST)

emmet-mode.elc: emmet-mode.el
/usr/bin/env emacs --batch --eval '(byte-compile-file "emmet-mode.el")'

src/snippets.el: conf/snippets.json
tools/json2hash conf/snippets.json -o src/snippets.el --defvar 'zencoding-snippets'
tools/json2hash conf/snippets.json -o src/snippets.el --defvar 'emmet-snippets'

src/preferences.el: conf/preferences.json
tools/json2hash conf/preferences.json -o src/preferences.el --defvar 'zencoding-preferences'
tools/json2hash conf/preferences.json -o src/preferences.el --defvar 'emmet-preferences'

clean:
rm -f zencoding-mode.el src/snippets.el src/preferences.el
rm -f emmet-mode.elc emmet-mode.el src/snippets.el src/preferences.el

test:
/usr/bin/env emacs --script src/test.el

docs:
echo docs

.PHONY: all test docs clean
.PHONY: all test docs clean
24 changes: 12 additions & 12 deletions README.md
Expand Up @@ -10,34 +10,34 @@ Zen Coding has been renamed to [Emmet](http://emmet.io/) and includes an expande

## Abbreviation Examples

- [HTML abbreviations](https://github.com/smihica/zencoding#html-abbreviations)
- [CSS abbreviations](https://github.com/smihica/zencoding#css-abbreviations)
- [HTML abbreviations](https://github.com/smihica/emmet#html-abbreviations)
- [CSS abbreviations](https://github.com/smihica/emmet#css-abbreviations)

## Installation

Just make sure zencoding-mode.el is in your `load-path`, if you
extracted zencoding-mode to a directory:
Just make sure emmet-mode.el is in your `load-path`, if you
extracted emmet-mode to a directory:

(add-to-list 'load-path "~/emacs.d/zencoding-mode")
(add-to-list 'load-path "~/emacs.d/emmet-mode")

And then just require as normal:

(require 'zencoding-mode)
(require 'emmet-mode)

## Usage

Enable it by running `M-x zencoding-mode`. You probably want to add it
Enable it by running `M-x emmet-mode`. You probably want to add it
to auto-load on your sgml modes:

(add-hook 'sgml-mode-hook 'zencoding-mode) ;; Auto-start on any markup modes
(add-hook 'css-mode-hook 'zencoding-mode) ;; enable Emmet's css abbreviation.
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
(add-hook 'css-mode-hook 'emmet-mode) ;; enable Emmet's css abbreviation.

And you can set default indent depth of HTML abbreviation.

(add-hook 'zencoding-mode-hook (lambda () (setq zencoding-indentation 2))) ;indent 2 spaces.
(add-hook 'emmet-mode-hook (lambda () (setq emmet-indentation 2))) ;indent 2 spaces.

Good to go: place point in a zencoding snippet and press C-j to expand it (or
alternatively, alias your preferred keystroke to M-x zencoding-expand-line) and
Good to go: place point in a emmet snippet and press C-j to expand it (or
alternatively, alias your preferred keystroke to M-x emmet-expand-line) and
you'll transform your snippet into the appropriate tag structure.

## HTML abbreviations
Expand Down

0 comments on commit bbb8dab

Please sign in to comment.