]> git.rmz.io Git - dotfiles.git/commitdiff
vim: don't set viminfo in nvim
authorSamir Benmendil <me@rmz.io>
Sat, 14 Jan 2023 01:07:09 +0000 (01:07 +0000)
committerSamir Benmendil <me@rmz.io>
Sat, 14 Jan 2023 02:35:28 +0000 (02:35 +0000)
vim/vimrc

index 092f59489d404dfec4cb9c6034999938d976d318..1ef5db9795530d475d3f0bace2fa6b44bb499e92 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -354,7 +354,15 @@ set isfname-==    " don't treat `=` as being part of filenames
 " various {{{2
 set virtualedit+=block     " let cursor move past last char in <C-V> mode
 set virtualedit+=onemore   " allow the cursor to move just past the end of the line
-set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo " viminfo defaults but save file in .cache
+if !has('nvim')
+  " viminfo defaults but save file in .cache
+  set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo
+else
+  " shada is the replacement format for viminfo
+  " this setting is probably not needed as it's most likely the default
+  " the default path is in XDG_DATA_HOME, which is fine
+  set shada='100,<50,s10,h
+endif
 
 set viewdir=$XDG_CACHE_HOME/vim/view//