GitHub:里面有详细的文档说明
https://github.com/mattn/emmet-vim
下载地址:
http://www.vim.org/scripts/script.php?script_id=2981
选择一个最新版下载,copy 到~/.vim目录下解压就可以了。
案例:
$vim index.html
输入:
然后按住Ctrl+y 再按","结果:
Emmet的基本用法:先写简写形式,然后用"<Ctrl+y>,"将其转成HTML代码
基本规则:
(1):E 代表HTML标签
(2):E#id 代表标签E有id属性
(3):E.class 代表E有class属性
(4):E[attr=foo] 代表某个特定属性
(5):E{info} 代表标签E包含的内容是info
(6):E>N 代表N是E的子元素
(7):E+N 代表N是E的同级元素
(8):E^N 代表N是E的上级元素
具体教程参考:
http://coding.smashingmagazine.com/2013/03/26/goodbye-zen-coding-hello-emmet/