aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vim/vimrc9
1 files changed, 3 insertions, 6 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 6bad90a6..3a6fd7b5 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -1,13 +1,10 @@
" Tom Ryder (tejr)'s vimrc: <https://sanctum.geek.nz/cgit/dotfiles.git>
" Requires Vim 7.0 or newer with +eval.
-" Set an environment variable for the user runtime directory
+" Set an environment variable for the user runtime directory, if not already
+" set; use the first element of &runtimepath, rather like 'spellfile'
if !exists('$MYVIM')
- let $MYVIM = expand(
- \ has('win32') || has('win64')
- \ ? '~/vimfiles'
- \ : '~/.vim'
- \ )
+ let $MYVIM = expand(split(&runtimepath, ',')[0])
endif
" The all-important default indent settings; filetypes to tweak