aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc8
1 files changed, 8 insertions, 0 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 77d47ece..a4c9e5cb 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -121,6 +121,14 @@ if $MYVIM !=# ''
EnsureDir $MYVIM
endif
+" If the MYVIM environment variable was set outside Vim, it may not correspond
+" to the first element of the default &runtimepath. If this is the case,
+" we'll slot it in, having already checked it for troublesome characters.
+"
+if $MYVIM !=# s:SplitOption(&runtimepath)[0]
+ set runtimepath^=$MYVIM
+endif
+
" Create a 'vimrc' automatic command hook group, if it already exists, and
" clear away any automatic command hooks already defined within it if it does,
" so that we don't end up collecting multiple copies of the hooks configured