From ca6da1729156f74bb36ba94a864ab5e39e78ae3b Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sat, 4 Jun 2022 16:53:35 +0800 Subject: Try using nvim --- .vimrc | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 978e919..4f25b5d 100644 --- a/.vimrc +++ b/.vimrc @@ -28,6 +28,13 @@ if has('python3') elseif has('python') endif +if has('nvim') + set packpath^=~/.vim + set packpath+=~/.vim/after + set runtimepath^=~/.vim + set runtimepath+=~/.vim/after +endif + " GUI set guioptions-=m @@ -43,8 +50,11 @@ set nofoldenable set hidden -set completeopt=menu,menuone,popup,noinsert,noselect -set completepopup=align:menu,border:off,highlight:WildMenu +set completeopt=menu,menuone,noinsert,noselect +if !has('nvim') + set completeopt+=popup + set completepopup=align:menu,border:off,highlight:WildMenu +endif set shortmess+=c set belloff+=ctrlg @@ -52,10 +62,15 @@ set belloff+=ctrlg set diffopt+=followwrap,algorithm:patience " undo -if !isdirectory(expand('~/.vim/.undo')) - silent! call mkdir(expand('~/.vim/.undo', 'p')) +let s:undodir = expand('~/.vim/.undo') +if has('nvim') + " The undo file of vim and nvim is not compatible + let s:undodir = expand('~/.vim/.undo/nvim') +endif +if !isdirectory(expand(s:undodir)) + silent! call mkdir(expand(s:undodir, 'p')) endif -set undodir=~/.vim/.undo// +let &undodir=s:undodir set undofile " set Vim-specific sequences for RGB colors -- cgit v1.2.3