diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-09 17:28:31 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-09 17:28:31 +1200 |
commit | c30d6d886f5763b44dd3fcd4eb14c3763484c3bb (patch) | |
tree | 61fd423624981bdeb7edcd91f91917118cb76388 | |
parent | Remove 'showmatch' again (diff) | |
download | dotfiles-c30d6d886f5763b44dd3fcd4eb14c3763484c3bb.tar.gz dotfiles-c30d6d886f5763b44dd3fcd4eb14c3763484c3bb.zip |
Add $MYVIM/vimrc hook conditionally
-rw-r--r-- | vim/vimrc | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -160,8 +160,12 @@ augroup END " apply immediately in the current editing session. This often makes broken " changes immediately apparent. " -autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc +autocmd vimrc BufWritePost $MYVIMRC \ source $MYVIMRC +if $MYVIMRC !=# '' + autocmd vimrc BufWritePost $MYVIM/vimrc + \ doautocmd vimrc BufWritePost $MYVIMRC +endif " Similarly, if this file or the vimrc stub that calls it is sourced, whether " because of the above hook, or the <Leader>R mapping prescribed later in this |