クリーンインストールしたmacに環境構築する(2)
1の続きですー。
今回はvim周りをやっていきます。
ぼくもvimをちゃんと使い始めたのは最近なのでもしかしたら間違っているところがあるかもしれません...><
dein.vim
vimのプラグインを管理してくれるやつです。
.vimrcに追記するだけでinstallとかやってくれて便利です。
公式にそってやっていきます。
インストール
$ curl https://raw.githubusercontent.com/Shougo/dein.vim/master/bin/installer.sh > installer.sh # For example, we just use `~/.cache/dein` as installation directory $ sh ./installer.sh ~/.cache/dein
.vimrcがあれば、下を追記。なければ作りましょう~
if &compatible set nocompatible endif " Add the dein installation directory into runtimepath set runtimepath+=~/.cache/dein/repos/github.com/Shougo/dein.vim if dein#load_state('~/.cache/dein') call dein#begin('~/.cache/dein') call dein#add('~/.cache/dein/repos/github.com/Shougo/dein.vim') call dein#add('Shougo/deoplete.nvim') if !has('nvim') call dein#add('roxma/nvim-yarp') call dein#add('roxma/vim-hug-neovim-rpc') endif call dein#end() call dein#save_state() endif filetype plugin indent on syntax enable
vimを開いて、下のコマンドを実行
:call dein#install()
.vimrc
ぼくは下のプラグインを入れています。
call dein#add('scrooloose/nerdtree') call dein#add('tomasr/molokai') call dein#add('editorconfig/editorconfig-vim') call dein#add('mattn/emmet-vim') call dein#add('hail2u/vim-css3-syntax') call dein#add('othree/html5.vim') call dein#add('pangloss/vim-javascript') call dein#add('nikvdp/ejs-syntax')
nerdtreeがめちゃくちゃ便利でおすすめです。