diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-19 16:30:56 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-12-19 16:30:56 +1300 |
commit | 5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb (patch) | |
tree | 0b7bda895fd9235daf64e9d51240c354fb823f69 | |
parent | Remove redundant links (diff) | |
download | dotfiles-5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb.tar.gz dotfiles-5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb.zip |
Make .vimrc stub more resilient to older Vims
-rw-r--r-- | vim/vimrc.stub.vim | 20 |
1 files 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 |