diff options
Diffstat (limited to '.vimrc')
-rw-r--r-- | .vimrc | 25 |
1 files changed, 20 insertions, 5 deletions
@@ -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 |