From d2922f922a793cac6d5d39411dcd33f8f7a0a5af Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 25 May 2019 00:16:20 +1200 Subject: Save a different path for 'viminfo' file --- vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vim/vimrc b/vim/vimrc index 130fe16f..56ee3d51 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -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 -- cgit v1.2.3