aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2020-05-09 14:27:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2020-05-09 14:27:36 +1200
commita43a2aca36bfe1a8a8b60ce604d7a89a2fddc08f (patch)
tree0faebf308f7a5b118cf825ce785d687cae7c2c87 /vim/vimrc
parentUse more idiomatic approach to get() defaulting (diff)
downloaddotfiles-a43a2aca36bfe1a8a8b60ce604d7a89a2fddc08f.tar.gz
dotfiles-a43a2aca36bfe1a8a8b60ce604d7a89a2fddc08f.zip
Test $MYVIM is defined and non-empty for defining
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc12
1 files changed, 10 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 986c2afc..1825c53e 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -2,7 +2,7 @@
" Tom Ryder (tejr)’s Literate Vimrc
" ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
"
-" Last updated: Fri, 08 May 2020 11:31:29 UTC
+" Last updated: Sat, 09 May 2020 01:47:32 UTC
"
" │ And I was lifted up in heart, and thought
" │ Of all my late-shown prowess in the lists,
@@ -346,8 +346,12 @@ augroup END
" saves restarting Vim or running the :source command manually, which I almost
" always want to do after changing my vimrc file anyway.
"
-autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc
+autocmd vimrc BufWritePost $MYVIMRC
\ ReloadVimrc
+if $MYVIM !=# ''
+ autocmd vimrc BufWritePost $MYVIM/vimrc
+ \ ReloadVimrc
+endif
" If Vim is new enough (v7.0.187) to support the ##SourceCmd event for
" automatic command hooks, we'll also apply a hook for that event to catch
@@ -359,6 +363,10 @@ autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc
if exists('##SourceCmd')
autocmd vimrc SourceCmd $MYVIMRC,$MYVIM/vimrc
\ ReloadVimrc
+ if $MYVIM !=# ''
+ autocmd vimrc SourceCmd $MYVIM/vimrc
+ \ ReloadVimrc
+ endif
endif
" For spelling, use New Zealand English by default, but later on we’ll