weblog of key_amb

主にIT関連の技術メモ

Vimプラグインの管理にNeoBundleを使う

※2015/6/12 .vimrc の書き方を最新に更新しました。

NeoBunlde は Vundle を元にして作られた改良版のようだ。 http://vim-users.jp/2011/10/hack238/ に作者の記事がある。

使い方は簡単。

|| mkdir -p ~/.vim/bundle git clone https://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim ||<

その後、下記のように.vimrcを設定する。

|vim| filetype off if has('vim_starting') if &compatible set nocompatible " Be iMproved endif

" Required: set runtimepath+=~/.vim/bundle/neobundle.vim endif

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

" Let NeoBundle manage NeoBundle " Required: NeoBundleFetch 'Shougo/neobundle.vim'

" ここにインストールしたいプラグインのリストを書く: NeoBundle 'Shougo/unite.vim' NeoBundle 'Shougo/unite-outline' NeoBundle 'Align' :

call neobundle#end()

" Reqiured: filetype plugin indent on

" If there are uninstalled bundles found on startup, " this will conveniently prompt you to install them. NeoBundleCheck ||<

この後、vim を再起動すると、未インストールのプラグインがある場合、最後の NeoBundleCheck の作用で、「インストールしますか?(y/n)」という感じで聞かれます。ので、「y」と答えればよいです。

簡単ですねー。

** 参考