From 5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 19 Dec 2018 16:30:56 +1300 Subject: Make .vimrc stub more resilient to older Vims --- vim/vimrc.stub.vim | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vim/vimrc.stub.vim b/vim/vimrc.stub.vim index 72c7f7e1..d348bd71 100644 --- a/vim/vimrc.stub.vim +++ b/vim/vimrc.stub.vim @@ -1,14 +1,14 @@ -" If we have Vim version >=7, and (implicitly) +eval, source real vimrc +" If we have non-tiny Vim version >=7, source real vimrc; this works because +" tiny and/or ancient builds of Vim quietly igore all code in :if blocks if v:version >= 700 runtime vimrc + finish +endif -" If not, prevent Vim from using any part of our configuration +" Otherwise, prevent Vim from using any part of our configuration +set runtimepath-=~/.vim +set runtimepath-=~/.vim/after +if has('win32') || has('win64') + set runtimepath-=~/vimfiles + set runtimepath-=~/vimfiles/after else - if has('win32') || has('win64') - set runtimepath-=~/vimfiles - set runtimepath-=~/vimfiles/after - else - set runtimepath-=~/.vim - set runtimepath-=~/.vim/after - endif -endif -- cgit v1.2.3