diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-09-19 20:38:49 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-09-19 20:38:49 +1200 |
commit | 1fb81a1b5a9d405985fec58e6dc13a7cd1a55efd (patch) | |
tree | 0afa702c9c2571fea9ef2612cbe924c6863ec1a7 /vim | |
parent | Add Newsbeuter->Newsboat spelling corrections (diff) | |
download | dotfiles-1fb81a1b5a9d405985fec58e6dc13a7cd1a55efd.tar.gz dotfiles-1fb81a1b5a9d405985fec58e6dc13a7cd1a55efd.zip |
Simplify/correct vimrc matching rules
It looks like :doautocmd doesn't actually expand variables like
$MYVIMRC; I could have sworn it did...
Diffstat (limited to 'vim')
-rw-r--r-- | vim/vimrc | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -2,7 +2,7 @@ " Tom Ryder (tejr)’s Literate Vimrc " ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ " -" Last updated: Sat, 19 Sep 2020 08:23:14 UTC +" Last updated: Sat, 19 Sep 2020 08:36:41 UTC " " │ And I was lifted up in heart, and thought " │ Of all my late-shown prowess in the lists, @@ -379,12 +379,8 @@ 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 +autocmd vimrc BufWritePost $MYVIMRC,$MYVIM/vimrc \ ReloadVimrc -if $MYVIM !=# '' - autocmd vimrc BufWritePost $MYVIM/vimrc - \ doautocmd vimrc BufWritePost $MYVIMRC -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 @@ -394,12 +390,8 @@ endif " <https://github.com/vim/vim/releases/tag/v7.0.187> " if exists('##SourceCmd') - autocmd vimrc SourceCmd $MYVIMRC + autocmd vimrc SourceCmd $MYVIMRC,$MYVIM/vimrc \ ReloadVimrc - if $MYVIM !=# '' - autocmd vimrc SourceCmd $MYVIM/vimrc - \ doautocmd vimrc SourceCmd $MYVIMRC - endif endif " For spelling, use New Zealand English by default, but later on we’ll |