diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 02:23:52 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 02:23:52 +1200 |
commit | 124dfa9f44bbeb59d151c8007d9538477dae25e4 (patch) | |
tree | e99ef59d820d05df6d474d524ef058e0348380ba | |
parent | Move leader definitions (diff) | |
download | dotfiles-124dfa9f44bbeb59d151c8007d9538477dae25e4.tar.gz dotfiles-124dfa9f44bbeb59d151c8007d9538477dae25e4.zip |
Adjust 'viminfo' setting logic, add new env var
-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 |