diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-08 22:40:49 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-08 22:41:20 +1200 |
commit | 466a52130e0bf076cf19ba5a6fb181105b2b1442 (patch) | |
tree | 15b209dc71cc961dfcab38922b77c8dacc78e14f /vim/vimrc | |
parent | Remove repeated word (diff) | |
download | dotfiles-466a52130e0bf076cf19ba5a6fb181105b2b1442.tar.gz dotfiles-466a52130e0bf076cf19ba5a6fb181105b2b1442.zip |
More detail on vimrc re-sourcing
Diffstat (limited to 'vim/vimrc')
-rw-r--r-- | vim/vimrc | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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> |