vimの便利なPlugin(その5)Dein.vim
先日 vimの便利なPlugin(その4)でご紹介したプラグインの開発は終了していてバグのパッチのみが行われているらしいです。 そこで今回は同じ開発者のShougoさんが開発しているDein.vimをご紹介します。 今からNeoBundleを試すのでしたらDein.vimにした方が良いかもしれません。 また、既にNeoBundleをお使いの方はDein.vimへ移行した方が良いでしょう。
Dein.vimは、NeoBundleと同様でvimのプラグインマネージャです。 Pluginを手動でいれるのは手間ですので、まだ使ったことがない方は是非利用してみましょう。
Install
以下のコマンドでインストール用のシェルをダウンロード。(2行になってますが、1行で)
ダウンロードしたinstaller.shを以下の様にして実行。
実行すると、以下の様なメッセージが出力されるので、その指示通り、.vimrcファイルの先頭に出力された内容(以下のグリーンになった部分)を追加します。user_nameの部分は置き換えて下さい。
Begin fetching dein…
Initialized empty Git repository in /home/user_name/.vim/dein/repos/github.com/Shougo/dein.vim/.git/
remote: Counting objects: 3728, done.
remote: Compressing objects: 100% (101/101), done.
remote: Total 3728 (delta 54), reused 0 (delta 0), pack-reused 3626
Receiving objects: 100% (3728/3728), 688.50 KiB | 104 KiB/s, done.
Resolving deltas: 100% (2148/2148), done.
Done.
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/user_name/.vim/dein/repos/github.com/Shougo/dein.vim
” Required:
call dein#begin(‘/home/user_name/.vim/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()
call dein#save_state()
” Required:
filetype plugin indent on
syntax enable
” 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!
使い方
プラグインインストール
以下のコマンドを実行することで 「call dein#add(‘XXX/YYY’)」に記述されたPluginをインストールすることができます。
以下のようにインストールされたPluginが列挙されたらインストール完了です。
プラグインのアップデート
以下のコマンドを実行することで 「call dein#add(‘XXX/YYY’)に記述されたPluginをアップデートすることができます。
この記事へのコメントはこちら
コメントを投稿するにはログインしてください。