さわだのノート

書籍のお仕事に役立つかもしれない思いつきを記録しています。

RSS: 記事の更新情報 Rss Feed

NeoBundleでVimのプラグインを管理する

もうすでにいろんなところで書かれているけど、一応自分用のメモとして記録しておきます。
下記手順はMac OS Xの場合です。

NeoBundleをダウンロードする

NeoBundleをgithubからダウンロードします。
ターミナルを起動して、下記コマンドを入力。

$ cd ~/.vim
$ git clone git://github.com/Shougo/neobundle.vim.git
$ mkdir .bundle

NeoBundleで管理するプラグインは「.bundle」フォルダーにインストールされます。

.vimrcの設定

.vimrcに下記の設定内容を入力します。
runtimepathに先ほど.vimにインストールした「neobundle.vim.git」へのパスを追加しておきます。「NeoBundle "プラグイン名|githubのURL"」でインストールしたいプラグインを指定します。

"----------------------------------------
" plugin - NeoBundle
"----------------------------------------
set nocompatible
filetype plugin indent off

if has('vim_starting')
  set runtimepath+=~/.vim/neobundle.vim.git
  call neobundle#rc(expand('~/.vim/.bundle/'))
endif

NeoBundle 'git://github.com/tpope/vim-surround.git'
NeoBundle 'git://github.com/tpope/vim-repeat.git'
NeoBundle 'git://github.com/Shougo/neocomplcache.git'
NeoBundle 'git://github.com/Shougo/neocomplcache-snippets-complete.git'
" NeoBundle 'git://github.com/Shougo/unite.vim.git'
NeoBundle 'git://github.com/Shougo/vimproc.git'
NeoBundle 'git://github.com/Shougo/vimshell.git'
NeoBundle 'git://github.com/thinca/vim-quickrun.git'
NeoBundle 'git://github.com/mattn/zencoding-vim.git'
" NeoBundle 'git://github.com/c9s/perlomni.vim.git'
NeoBundle 'git://github.com/altercation/vim-colors-solarized.git'
NeoBundle 'git://github.com/Lokaltog/vim-powerline.git'
NeoBundle 'git://github.com/scrooloose/syntastic.git'
NeoBundle 'git://github.com/othree/eregex.vim.git'
NeoBundle 'L9'
NeoBundle 'FuzzyFinder'
NeoBundle 'QuickBuf'
NeoBundle 'git://github.com/thinca/vim-ref.git'

filetype plugin indent on

プラグインのインストールを実行する

ここまでできたら、Vimで新しいウィンドウを立ち上げて下記コマンドを実行するだけ。

: NeoBundleInstall

プラグインを更新したいときは下記のコマンドを実行します。

: NeoBundle