vimrc: wrap PlugInstall in augroup
This commit is contained in:
parent
e1d79a8b6b
commit
31b35a8fb1
11
.vim/vimrc
11
.vim/vimrc
@ -10,10 +10,13 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||
endif
|
||||
|
||||
" Run PlugInstall if there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
augroup plug_auto_install
|
||||
autocmd!
|
||||
" Run PlugInstall if there are missing plugins
|
||||
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||
\| PlugInstall --sync | source $MYVIMRC
|
||||
\| endif
|
||||
augroup END
|
||||
|
||||
" both "filetype indent on" and "syntax on" are called by Plug, keeping DRY
|
||||
call plug#begin()
|
||||
|
Loading…
Reference in New Issue
Block a user