aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-08 22:40:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-08 22:41:20 +1200
commit466a52130e0bf076cf19ba5a6fb181105b2b1442 (patch)
tree15b209dc71cc961dfcab38922b77c8dacc78e14f /vim/vimrc
parentRemove repeated word (diff)
downloaddotfiles-466a52130e0bf076cf19ba5a6fb181105b2b1442.tar.gz
dotfiles-466a52130e0bf076cf19ba5a6fb181105b2b1442.zip
More detail on vimrc re-sourcing
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc8
1 files changed, 6 insertions, 2 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 1641b36b..c843e0a1 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -115,8 +115,12 @@ autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc
if exists('##SourceCmd')
" We can't wrap this in a script-local function like I normally would,
- " because then Vim will get upset that we're trying to redefine it the next
- " time it loads. It's only four commands, anyway.
+ " because without a load guard around it, Vim will get upset that we're
+ " trying to redefine that function the next time this script loads.
+ "
+ " So, we just inline the whole thing into the hook. It's only four
+ " commands, anyway, and I'd rather most if not all of the vimrc was reloaded
+ " when we source it.
"
autocmd vimrc SourceCmd $MYVIMRC,$MYVIM/vimrc
\ source <afile>