Vimメモ : dein.vimをNeovimで使ってみる
NeoBundleの作者の新しいプラグインマネージャdein.vimをNeovimで使ってみる。NeoBundleよりシンプルで速いらしい。
インストール
Quick startには、
$ curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
$ sh ./installer.sh {specify the installation directory}こう書いてあったのでインストールディレクトリを指定して実行する。
$ curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
$ sh ./installer.sh sh ~/.config/nvim/dein
…
Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file:
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath^=/home/vagrant/.config/nvim/dein/repos/github.com/Shougo/dein.vim
" Required:
call dein#begin(expand('/home/vagrant/.config/nvim/dein'))
" Let dein manage dein
" Required:
call dein#add('Shougo/dein.vim')
" Add or remove your plugins here:
call dein#add('Shougo/neosnippet.vim')
call dein#add('Shougo/neosnippet-snippets')
" You can specify revision/branch/tag.
call dein#add('Shougo/vimshell', { 'rev': '3787e5' })
" Required:
call dein#end()
" Required:
filetype plugin indent on
" If you want to install not installed plugins on startup.
"if dein#check_install()
" call dein#install()
"endif
"End dein Scripts-------------------------
Done.
Complete setup dein!init.vimの編集
インストールしたときに下記設定をinit.vimの先頭に追加しろというメッセージがあったので追加してみる(init.vimのパスは~/.config/nvim/init.vim)。
if &compatible
set nocompatible " Be iMproved
endif
" Required:
set runtimepath^=/Users/username/.config/nvim/dein/repos/github.com/Shougo/dein.vim
" Required:
call dein#begin(expand('/Users/username/.config/nvim/dein'))
" Let dein manage dein
" Required:
call dein#add('Shougo/dein.vim')
" Add or remove your plugins here:
call dein#add('Shougo/neosnippet.vim')
call dein#add('Shougo/neosnippet-snippets')
" You can specify revision/branch/tag.
call dein#add('Shougo/vimshell', { 'rev': '3787e5' })
" Required:
call dein#end()
" Required:
filetype plugin indent on
" If you want to install not installed plugins on startup.
"if dein#check_install()
" call dein#install()
"endifこれだと起動時にプラグインをインストールする状態になっていないので、手動で下記コマンドを実行すると無事にプラグインがインストールされた。
:call dein#install()
他のプラグインを追加したい場合は、以下のようにcall dein#addを追加していく。
(実際はプラグインのリストはTOMLファイルに書くのがよいらしいが)
call dein#add('Shougo/unite.vim')プラグインのアップデート
プラグインをアップデートするには下記コマンドを実行する。
:call dein#update()

- 出版社/メーカー: MOLDEX
- メディア: ヘルスケア&ケア用品
- 購入: 7人 クリック: 8回
- この商品を含むブログを見る