Neobundleからdein.vimに移行

NeoBundle はオワコンだから dein 使おう!とか、
dein の方がとにかく爆速らしいとか最近よく見るようになったので、
折角だから新しい環境で試してみることにしてみた。

1.インストール

$ mkdir ~/.cache/dein
$ cd ~/.cache/dein
$ curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh
$ sh ./installer.sh ~/.cache/dein

完了すると下記メッセージが表示される。

Install to "/[ホームディレクトリ]/.cache/dein/repos/github.com/Shougo/dein.vim"...
 
git is /usr/bin/git
 
Begin fetching dein...
Initialized empty Git repository in [ホームディレクトリ]/.cache/dein/repos/github.com/Shougo/dein.vim/.git/
remote: Counting objects: 4302, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 4302 (delta 5), reused 0 (delta 0), pack-reused 4283
Receiving objects: 100% (4302/4302), 842.36 KiB | 591 KiB/s, done.
Resolving deltas: 100% (2470/2470), 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+=/[ホームディレクトリ]/.cache/dein/repos/github.com/Shougo/dein.vim
 
" Required:
if dein#load_state('/[ホームディレクトリ]/.cache/dein')
  call dein#begin('/[ホームディレクトリ]/.cache/dein')
 
  " Let dein manage dein
  " Required:
  call dein#add('/[ホームディレクトリ]/.cache/dein/repos/github.com/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()
endif
 
" 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!

# /[ホームディレクトリ]は自分のホームディレクトリになっているはずなので、ちゃんとコンソールに表示されたのを参照

Please add the following settings for dein to the top of your vimrc (Vim) or init.vim (NeoVim) file

らしいので、今回は.vimrcの一番上へ追記しておいた。

尚、

" If you want to install not installed plugins on startup.
"if dein#check_install()
"  call dein#install()
"endif

この部分のコメントアウトは外しておく。

" If you want to install not installed plugins on startup.
if dein#check_install()
  call dein#install()
endif

こうなるね。

このあとに、vimを起動するとインストール開始する。

あとは必要なプラグインをインストールする。
さっき追記した中にある、

” Add or remove your plugins here:

ここへ追記していく。

取り急ぎ使うのを追記してみた。

" Add or remove your plugins here:
call dein#add('Shougo/neosnippet.vim')
call dein#add('Shougo/neosnippet-snippets')
 
call dein#add('thinca/vim-quickrun')
call dein#add('slim-template/vim-slim')
call dein#add('hail2u/vim-css3-syntax')
call dein#add('kchmck/vim-coffee-script')
call dein#add('mattn/jscomplete-vim')
call dein#add('othree/html5.vim')
call dein#add('vim-ruby/vim-ruby')
call dein#add('tpope/vim-rails')
call dein#add('groenewege/vim-less')
call dein#add('lilydjwg/colorizer')

追記後に再度、.vimrcでもいいからvimを立ち上げると、コンソールに、

[dein] Not installed plugins: ['vim-quickrun', 'vim-css3-syntax', 'vim-ruby', 'vim-rails', 'vim-less', 'colorizer', 'vim-slim', 'html5.vim' ....

のように追記したものがインストールされていないと出てインストールが開始される。

完了すると、

[dein] Done: (2017/03/01 12:41:26)
Press ENTER or type command to continue

のようにDoneと出るがエラーが出てると、Errorって出るからちゃんと確認する。

投稿者:

kishir

趣味: sk8, ピスト、ターンテーブル、レコード 仕事: Python, Objective-C, PHP, JavaScript