emmet.vim


Ⅰ. 插件描述

vim plugins for HTML and CSS hi-speed coding.

Ⅱ. 基本信息

创建日期:  2010-03-16
使用用户:  4
Github星:  0
插件作者:  luofei

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'luofei614/emmet-vim-the-heights'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'luofei614/emmet-vim-the-heights'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'luofei614/emmet-vim-the-heights'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/luofei614/emmet.vim

Ⅳ. 文档说明

This is a mirror of http://www.vim.org/scripts/script.php?script_id=2981

This is vim script support expanding abbreviation like emmet.
ref: http://emmet.io/

There is a movie using emmet.vim
ref: http://mattn.github.com/emmet-vim

Source Repository.
ref: http://github.com/mattn/emmet-vim

Type abbreviation
+-------------------------------------
| html:5_
+-------------------------------------
"_" is a cursor position. and type "<c-y>," (Ctrl + y and Comma)
NOTE: Don't worry about key map. you can change it easily.
+-------------------------------------
| <!DOCTYPE HTML>
| <html lang="en">
| <head>
| <title></title>
| <meta charset="UTF-8">
| </head>
| <body>
| _
| </body>
| </html>
+-------------------------------------
Type following
+-------------------------------------
| div#foo$*2>div.bar
+-------------------------------------
And type "<c-y>,"
+-------------------------------------
|<div id="foo1">
| <div class="bar">_</div>
|</div>
|<div id="foo2">
| <div class="bar"></div>
|</div>
| _
+-------------------------------------

Tutorial:

http://github.com/mattn/emmet-vim/raw/master/TUTORIAL

How work this:

http://mattn.github.com/emmet-vim

Tips:

You can customize behavior of expanding with overriding config.
This configuration will be merged at loading plugin.

let g:user_emmet_settings = {
'indentation' : ' ',
'perl' : {
'aliases' : {
'req' : 'require '
},
'snippets' : {
'use' : "use strictnuse warningsnn",
'warn' : "warn "|";",
}
}
}

let g:user_emmet_expandabbr_key = '<c-e>'

let g:use_emmet_complete_tag = 1

You can set language attribute in html using emmet_settings['lang'].

添加新评论