dein.vimでvimのplugin管理
dein.vimとは
NeoBundleに変わる新しいプラグインマネージャーらしいです。Shougoさんのgithubの紹介だと
''Dein.vim is a dark powered Vim/Neovim plugin manager.''
だそうです。ものすごくかっこいい...(厨二病)
NeoBundleはバグ修正だけらしいので、Shougoさんもこっちを推奨している。私はvim使い始めて間もないのでよくわからんのですが
インストール
githubのREADMEをみれば基本的には迷わないと思う。
その他参考にしたもの
NeoBundleからdein.vimに乗り換えたら爆速だった話
ちなみに、自分の.vimrcはというと
"#####dein.vimの設定##### if &compatible set nocompatible endif set runtimepath+=~/.vim/dein/repos/github.com/Shougo/dein.vim if dein#load_state(expand('~/.vim/dein')) call dein#begin(expand('~/.vim/dein')) " プラグインリストを収めたTOMLファイル let g:dein_dir = expand('~/.vim/dein') let s:toml = g:dein_dir . '/dein.toml' let s:lazy_toml = g:dein_dir . '/dein_lazy.toml' " TOMLファイルにpluginを記述 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
こんな感じでdein.vimの設定
dein.tomlは、
[[plugins]] repo = 'Shougo/dein.vim' [[plugins]] repo = 'Shougo/unite.vim' [[plugins]] repo = 'tomasr/molokai'
dein_lazy.tomlは、
# python設定 [[plugins]] repo = 'hynek/vim-python-pep8-indent' on_ft = 'python' #[[plugins]] #repo = 'davidhalter/jedi-vim' #on_ft = 'python' #[[plugins]] #repo = 'lambdalisue/vim-pyenv' #depends = 'davidhalter/jedi-vim' #on_ft = 'python' [[plugins]] repo = 'jmcantrell/vim-virtualenv' on_ft = 'python' [[plugins]] repo = 'andviro/flake8-vim' on_ft = 'python' # 一般設定 [[plugins]] repo = 'Shougo/neocomplete.vim' insert = 1
自分はpyenv環境なのだが、なぜかjedi-vimがエラー吐いて動かないのでコメントアウトしてる。だれか教えて欲しい。いや、本当に