Trying to make it more HTML5 compatible
emmet-vim is a vim plug-in which provides support for expanding abbreviations similar to emmet.
- Removed attribute type="text/javascript" from
<script>
tag - Removed attribute type="text/css" from
<style>
tag - script:src - renders to
<script scr=""></script>
- when rendering html:5 - cursor is located between
<title></title>
tags - Removed closing slash from single tags -
<br>
instead of<br />
etc.
Open or create a New File:
vim index.html
Type ("_" is the cursor position):
html:5_
Then type "<c-y>," (Ctrl + y + ','), you should see:
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>_</title>
</head>
<body>
</body>
</html>
cd ~/.vim
unzip emmet-vim.zip
To install using pathogen.vim:
cd ~/.vim/bundle
unzip /path/to/emmet-vim.zip
To checkout the source from repository:
cd ~/.vim/bundle
git clone http://github.com/mattn/emmet-vim.git
or:
git clone http://github.com/mattn/emmet-vim.git
cd emmet-vim
cp plugin/emmet.vim ~/.vim/plugin/
cp autoload/emmet.vim ~/.vim/autoload/
cp -a autoload/emmet ~/.vim/autoload/