diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 00:16:20 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-25 00:16:20 +1200 |
commit | d2922f922a793cac6d5d39411dcd33f8f7a0a5af (patch) | |
tree | b979a36b63f66cd7b886739a26d608683115cc6c | |
parent | Adjust order of .vimrc (diff) | |
download | dotfiles-d2922f922a793cac6d5d39411dcd33f8f7a0a5af.tar.gz dotfiles-d2922f922a793cac6d5d39411dcd33f8f7a0a5af.zip |
Save a different path for 'viminfo' file
-rw-r--r-- | vim/vimrc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -191,6 +191,14 @@ if has('persistent_undo') 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 +if exists('+viminfofile') " Use the new method if we can (v8.1.716) + let &viminfofile = $MYVIM.'/viminfo' +else " Use old method instead; it works fine, it's just a bit clunky + execute 'set viminfo+=n'.escape($MYVIM.'/viminfo', '\ ') +endif + " Let me move beyond buffer text in visual block mode set virtualedit+=block |