From a3c71474366a3841dddccf7e50622b5ba3de141c Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 9 Jun 2019 15:52:52 +1200 Subject: Prepend $MYVIM to &runtimepath if not there --- vim/vimrc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'vim') 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 -- cgit v1.2.3