diff options
-rw-r--r-- | vim/vimrc | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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 |