aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-18 22:23:59 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-18 22:23:59 +1200
commit26d9f86f22f69e6ae2cde9c55861ccf92a202886 (patch)
treec0e61869daae3cfd6cd0554e73449afce97ddf66
parentMerge branch 'release/v6.29.0' into develop (diff)
downloaddotfiles-26d9f86f22f69e6ae2cde9c55861ccf92a202886.tar.gz
dotfiles-26d9f86f22f69e6ae2cde9c55861ccf92a202886.zip
Inline a script-local variable in vimrc
-rw-r--r--vim/vimrc9
1 files changed, 4 insertions, 5 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 50f19a1f..71959b4d 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -102,12 +102,11 @@ scriptencoding utf-8
" I'll factor all of this mess out into a global function if I ever need it
" anywhere else. Vim, I love you, but you are really weird.
"
-let s:runtimepath = map(
- \ split(&runtimepath, '\\\@<!,[, ]*')
- \,'substitute(v:val, ''\\,'', '''', ''g'')'
- \)
if !exists('$MYVIM')
- let $MYVIM = s:runtimepath[0]
+ let $MYVIM = map(
+ \ split(&runtimepath, '\\\@<!,[, ]*')
+ \,'substitute(v:val, ''\\,'', '''', ''g'')'
+ \)[0]
endif
" Having either imported or defined a value for the MYVIM environment