Need help with emmet-vim?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

5.7K Stars 411 Forks MIT License 1.1K Commits 108 Opened issues


emmet for vim:

Services available


Need anything else?

Contributors list


Build Status

emmet-vim is a vim plug-in which provides support for expanding abbreviations similar to emmet.



Download zip file:

cd ~/.vim

To install using pathogen.vim:

git clone ~/.vim/bundle/emmet-vim

To install using Vundle:

" add this line to your .vimrc file
Plugin 'mattn/emmet-vim'

To install using Vim-Plug:

" add this line to your .vimrc file
Plug 'mattn/emmet-vim'

To checkout the source from repository:

cd ~/.vim/bundle
git clone


git clone
cd emmet-vim
cp plugin/emmet.vim ~/.vim/plugin/
cp autoload/emmet.vim ~/.vim/autoload/
cp -a autoload/emmet ~/.vim/autoload/

Quick Tutorial

Open or create a New File:

vim index.html

Type ("_" is the cursor position):


Then type

(Ctrly,), and you should see:
<meta charset="UTF-8">


More Tutorials

Enable in different mode

If you don't want to enable emmet in all modes, you can use set these options in

let g:user_emmet_mode='n'    "only enable normal mode functions.
let g:user_emmet_mode='inv'  "enable all functions, which is equal to
let g:user_emmet_mode='a'    "enable all function in all mode.

Enable just for html/css

let g:user_emmet_install_global = 0
autocmd FileType html,css EmmetInstall

Redefine trigger key

To remap the default

let g:user_emmet_leader_key=''

Note that the trailing

still needs to be entered, so the new keymap would be

Adding custom snippets

If you have installed the web-api for emmet-vim you can also add your own snippets using a custom snippets.json file.

Once you have installed the web-api add this line to your .vimrc:

let g:user_emmet_settings = webapi#json#decode(join(readfile(expand('~/.snippets_custom.json')), "\n"))
You can change the path to your snippets_custom.json according to your preferences.

Here you can find instructions about creating your customized snippets.json file.

Snippet to add meta tag for responsiveness

Update this in your .vimrc file.

let g:user_emmet_settings = {
\  'variables': {'lang': 'ja'},
\  'html': {
\    'default_attributes': {
\      'option': {'value': v:null},
\      'textarea': {'id': v:null, 'name': v:null, 'cols': 10, 'rows': 10},
\    },
\    'snippets': {
\      'html:5': "\n"
\              ."\n"
\              ."\n"
\              ."\t\n"
\              ."\t\n"
\              ."\t\n"
\              ."\n"
\              ."\n\t${child}|\n\n"
\              ."",
\    },
\  },

Project Authors

Yasuhiro Matsumoto


  • Pressing ctrl+y+, doesn't work

Probably you set

. Most of Vim plugins which using key-mappings does not work with


Emmet official site:

zen-coding official site:


development repository:

my blog posts about zencoding-vim:

Japanese blog posts about zencoding-vim:

A Chinese translation of the tutorial:

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.