vimのプラグインマネージャをdeinに変えました
neobundleが開発終了したためdeinに乗り換えました。
とりあえず以下のようにvimrcを変更。
" プラグインが実際にインストールされるディレクトリ let s:dein_dir = expand('~/.vim/dein') " dein.vim 本体 let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim' " dein.vim がなければ github から落としてくる if &runtimepath !~# '/dein.vim' if !isdirectory(s:dein_repo_dir) execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir endif execute 'set runtimepath^=' . fnamemodify(s:dein_repo_dir, ':p') endif " 設定開始 if dein#load_state(s:dein_dir) call dein#begin(s:dein_dir) " プラグインリストを収めた TOML ファイル " ~/.vim/rc/dein.toml,deinlazy.tomlを用意する let g:rc_dir = expand('~/.vim/rc') let s:toml = g:rc_dir . '/dein.toml' let s:lazy_toml = g:rc_dir . '/dein_lazy.toml' " TOML を読み込み、キャッシュしておく call dein#load_toml(s:toml, {'lazy': 0}) call dein#load_toml(s:lazy_toml, {'lazy': 1}) " 設定終了 call dein#end() call dein#save_state() endif " もし、未インストールものものがあったらインストール if dein#check_install() call dein#install() endif filetype plugin indent on
プラグインリストをTOMLファイルに記述して管理していく。
~/.vim/rcにdein.tomlとdein_lazy.tomlを用意する。
dein.tomlは起動時に読み込むプラグイン。
dein_lazy.tomlは遅延読み込みプラグイン。
dein.tomlファイルの記述方法は以下の様な感じ。
#起動時に読み込むプラグイン記述ファイル [[plugins]] repo = 'Shougo/dein.vim' [[plugins]] repo = 'Shougo/vimproc.vim' build = 'make' [[plugins]] repo = 'vim-jp/vimdoc-ja' [[plugins]] repo = 'Shougo/neocomplete.vim' [[plugins]] repo = 'Shougo/unite.vim' [[plugins]] repo = 'Shougo/unite-outline' [[plugins]] repo = 'Shougo/vimfiler' [[plugins]] repo = 'Shougo/vimshell' [[plugins]] repo = 'thinca/vim-quickrun' [[plugins]] repo = 'osyo-manga/unite-quickfix' [[plugins]] repo = 'osyo-manga/shabadou.vim' [[plugins]] repo = 'itchyny/lightline.vim'
repoでレポジトリURLを指定する。
プラグインのアップデートは
:call dein#update()
で行う必要がある。
適当にキーマップしておくといいかもしれない。
nmap du :call dein#update()<cr>