aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-19 16:30:56 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-19 16:30:56 +1300
commit5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb (patch)
tree0b7bda895fd9235daf64e9d51240c354fb823f69
parentRemove redundant links (diff)
downloaddotfiles-5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb.tar.gz
dotfiles-5d67a92b1ee7d53aabe46e6fd4a56c40d855d9eb.zip
Make .vimrc stub more resilient to older Vims
-rw-r--r--vim/vimrc.stub.vim20
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