aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-16 01:25:11 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-16 01:29:15 +1200
commitac26a33542925fe5fa458572e2a0161f3d9c5beb (patch)
treead0f2e9c81421d8db07dd4967b80f10a6e1da25a
parentWrite out over-engineered path creation function (diff)
downloaddotfiles-ac26a33542925fe5fa458572e2a0161f3d9c5beb.tar.gz
dotfiles-ac26a33542925fe5fa458572e2a0161f3d9c5beb.zip
Bail from Vim if &runtimepath is empty
Really shouldn't happen, but probably worth catching.
-rw-r--r--vim/vimrc5
1 files changed, 3 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index dc1183f6..0d9c7b39 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -113,9 +113,10 @@ endif
" first value from the 'runtimepath'. We'll use this later on in the file to
" comprehensively match expected paths for vimrc files.
"
-if &runtimepath !=# ''
- let $MYVIM = option#Split(&runtimepath)[0]
+if &runtimepath ==# ''
+ throw 'Empty ''runtimepath'''
endif
+let $MYVIM = option#Split(&runtimepath)[0]
" The next components of the runtime directory that we'll set up here will
" make use of the user’s configured XDG base directories: