aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-06-04 16:53:35 +0800
committerGuangxiong Lin <[email protected]>2022-06-04 18:36:58 +0800
commitca6da1729156f74bb36ba94a864ab5e39e78ae3b (patch)
treea8b5d6310eb51a338f9f8808d45a63ce2e5d9b50 /.vimrc
parent07231696a2e090790bda1910ec85a7dec3ecbb69 (diff)
downloaddotfiles-ca6da1729156f74bb36ba94a864ab5e39e78ae3b.tar.gz
dotfiles-ca6da1729156f74bb36ba94a864ab5e39e78ae3b.tar.bz2
dotfiles-ca6da1729156f74bb36ba94a864ab5e39e78ae3b.zip
Try using nvim
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc25
1 files changed, 20 insertions, 5 deletions
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