aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc9
1 files changed, 5 insertions, 4 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 3558a09c..416eece3 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -181,12 +181,13 @@ if has('persistent_undo') " v7.2.438
set undodir^=$MYVIM/cache/undo//
endif
-" Keep the viminfo file in the ~/.vim directory, mostly to stop history
-" getting clobbered when something runs Vim without using this file
+" Keep the viminfo file in the home Vim directory, mostly to stop history
+" getting clobbered when something runs Vim without using this vimrc
+let $VIMINFO = $MYVIM.'/viminfo'
if exists('+viminfofile') " Use new option method if we can (v8.1.716)
- let &viminfofile = $MYVIM.'/viminfo'
+ let &viminfofile = $VIMINFO
else " Resort to clunkier method with 'viminfo' option flag
- execute 'set viminfo+=n'.escape($MYVIM.'/viminfo', '\ ')
+ execute 'set viminfo+=n'.escape($VIMINFO, '\ ')
endif
" Let me move beyond buffer text in visual block mode