NeovimとVim8とどちらを使うか迷いましたが、暗黒美無王のプラグインの設定が楽そうなのでNeovimを使っています
Installing Neovim
Installing Neovim · neovim/neovim Wiki
$ nvim
でNeovimを開いて
:CheckHealth
出てくるWarningを片付けていくとよいです
need to install xclip or xsel だそうなので
$ sudo apt install xsel
Nvim documentation: provider-python
$ sudo apt-get install python-dev python-pip python3-dev python3-pip
$ pip install pynvim
$ pip3 install pynvim
$ gem install neovim
$ npm install -g neovim
Pluginマネージャーは
GitHub - Shougo/dein.vim: Dark powered Vim/Neovim plugin manager
を使います
設定
$ nvim ~/.config/nvim/init.vim
let s:dein_dir = s:cache_home . '/dein'
let s:dein_repo_dir = s:dein_dir . '/repos/dein.vim'
let s:toml_dir = s:config_dir . '/dein'
if !isdirectory(s:dein_repo_dir)
execute '!git clone [email protected]:Shougo/dein.vim.git' s:dein_repo_dir
if !isdirectory(s:toml_dir)
execute '!mkdir -p' s:toml_dir
execute '!touch ' . s:toml_dir . '/plugins.toml'
execute '!touch ' . s:toml_dir . '/lazy.toml'
execute '!touch ' . s:toml_dir . '/neovim.toml'
endif
endif
execute 'set runtimepath^=' . s:dein_repo_dir
if dein#load_state(s:dein_dir)
call dein#begin(s:dein_dir)
call dein#load_toml(s:toml_dir . '/plugins.toml', {'lazy': 0})
call dein#load_toml(s:toml_dir . '/lazy.toml', {'lazy': 1})
if has('nvim')
call dein#load_toml(s:toml_dir . '/neovim.toml', {'lazy': 1})
endif
call dein#end()
call dein#save_state()
endif
:call dein#install()
:call dein#update()
on_i = 1 -> insert modeになったら読み込む
on_cmd => ['xxx'] -> xxxを実行したら読み込む
on_source = ['xxx.nvim'] -> xxx.nvimが読み込まれたら読み込む
Shougo/denite.nvim: Dark powered asynchronous unite all interfaces for Neovim/Vim8
:UpdateRemotePlugins
でdeniteが返ってくればOK
$ nvim ~/.config/dein/neovim.toml
[[plugins]]
repo = 'Shougo/denite.nvim'
if = 'has("nvim")'
hook_add = '''
nnoremap [unite] <Nop>
nmap , [denite]
nmap <silent> [denite]<C-t> :<C-u>Denite filetype<CR>
nmap <silent> [denite]<C-p> :<C-u>Denite file_rec<CR>
nmap <silent> [denite]<C-j> :<C-u>Denite line<CR>
nmap <silent> [denite]<C-g> :<C-u>Denite grep<CR>
nmap <silent> [denite]<C-]> :<C-u>DeniteCursorWord grep<CR>
nmap <silent> [denite]<C-u> :<C-u>Denite file_mru<CR>
nmap <silent> [denite]<C-y> :<C-u>Denite neoyank<CR>
nmap <silent> [denite]<C-r> :<C-u>Denite -resume<CR>
nmap <silent> [denite]; :<C-u>Denite -resume -immediately -select=+1<CR>
nmap <silent> [denite]- :<C-u>Denite -resume -immediately -select=-1<CR>
nmap <silent> [denite]<C-d> :<C-u>call denite#start([{'name': 'file_rec', 'args': ['~/.config/dein']}])<CR>
'''