LoginSignup
7
7

More than 5 years have passed since last update.

VimでEmmetを使えるようにする

Last updated at Posted at 2016-09-18

NeoBunbleとemmet-vimのインストール

※尚、NeoBundleは非推奨となったようです。

NeoBundleをインストール

# 配置先のディレクトリを作成する
mkdir -p ~/.vim/bundle
cd ~/.vim/bundle

# NeoBundleをgitHubのリポジトリから取得する
git clone git://github.com/Shougo/neobundle.vim

# emmet-vimをgitHubのリポジトリから取得する
git clone https://github.com/mattn/emmet-vim.git 

vimの設定ファイル~/.vimrcを作成

" Note: Skip initialization for vim-tiny or vim-small.
if 0 | endif

filetype off

if has('vim_starting')
  if &compatible
    set nocompatible               " Be iMproved
  endif

  set runtimepath+=~/.vim/bundle/neobundle.vim
endif

call neobundle#begin(expand('~/.vim/bundle/'))

" originalrepos on github
NeoBundle 'Shougo/neobundle.vim'
NeoBundle 'Shougo/vimproc', {
  \ 'build' : {
    \ 'windows' : 'make -f make_mingw32.mak',
    \ 'cygwin' : 'make -f make_cygwin.mak',
    \ 'mac' : 'make -f make_mac.mak',
    \ 'unix' : 'make -f make_unix.mak',
  \ },
\ }
NeoBundle 'VimClojure'
NeoBundle 'Shougo/vimshell'
NeoBundle 'Shougo/unite.vim'
NeoBundle 'Shougo/neocomplcache'
NeoBundle 'Shougo/neosnippet'
NeoBundle 'jpalardy/vim-slime'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'Shougo/vimfiler.vim'
NeoBundle 'itchyny/lightline.vim'
NeoBundle 't9md/vim-textmanip'

NeoBundle 'Shougo/unite.vim'
NeoBundle 'ujihisa/unite-colorscheme'
NeoBundle 'tomasr/molokai'
""NeoBundle 'https://bitbucket.org/kovisoft/slimv'

call neobundle#end()

filetype plugin indent on     " required!
filetype indent on
syntax on

NeoBundleCheck

インストール用シェルファイルをダウンロードし、実行

$ curl https://raw.githubusercontent.com/Shougo/neobundle.vim/master/bin/install.sh > install.sh
$ sh ./install.sh
$ rm -rf install.sh

Emmetをインストール

設定を追記

下記を~/.vimrc call neobundle#end() より上に追加

~/.vimrc
NeoBundle 'mattn/emmet-vim'
# 実行時のキーバインド変更する場合(ここではYからEに変更)
let g:user_emmet_leader_key = '<C-E>'

プラグインをインストール

vim上で :NeoBundleInstall

VimへのNeoBundleのインストール(2015/09/21版)
VimにEmmet導入して爆速HTMLコーディング

7
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
7