diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-09 15:52:52 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-09 16:17:33 +1200 |
commit | a3c71474366a3841dddccf7e50622b5ba3de141c (patch) | |
tree | c7e77e7f0fce742f75babace351c1669279e122f | |
parent | Move EnsureDir() declaration up, ensure $MYVIM (diff) | |
download | dotfiles-a3c71474366a3841dddccf7e50622b5ba3de141c.tar.gz dotfiles-a3c71474366a3841dddccf7e50622b5ba3de141c.zip |
Prepend $MYVIM to &runtimepath if not there
-rw-r--r-- | vim/vimrc | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |