mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-24 21:16:51 -07:00
Run plug#end before checking g:plugs. https://github.com/junegunn/vim-plug/issues/1039
parent
ea2ad17b06
commit
5cadf12035
9
tips.md
9
tips.md
@ -31,8 +31,15 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
|||||||
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
call plug#begin()
|
||||||
|
if exists('g:loaded_plug')
|
||||||
|
// Uncommment the following line to install documentation
|
||||||
|
// Plug 'junegunn/vim-plug'
|
||||||
|
call plug#end()
|
||||||
|
endif
|
||||||
|
|
||||||
" Run PlugInstall if there are missing plugins
|
" Run PlugInstall if there are missing plugins
|
||||||
if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
if exists('g:plugs') && len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
endif
|
endif
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user