mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
update vim-plug install logic
This commit is contained in:
parent
eb7df6b06c
commit
32d69040d6
@ -11,7 +11,10 @@ scriptencoding utf-8
|
|||||||
let g:vim_plug_fpath = expand(stdpath('data') . '/autoload/plug.vim')
|
let g:vim_plug_fpath = expand(stdpath('data') . '/autoload/plug.vim')
|
||||||
if g:is_win || g:is_mac
|
if g:is_win || g:is_mac
|
||||||
if empty(glob(g:vim_plug_fpath))
|
if empty(glob(g:vim_plug_fpath))
|
||||||
if executable('curl')
|
if !executable('curl')
|
||||||
|
echoerr 'Curl not available on your system, you may install vim-plug by yourself.'
|
||||||
|
finish
|
||||||
|
endif
|
||||||
echomsg 'Installing Vim-plug on your system'
|
echomsg 'Installing Vim-plug on your system'
|
||||||
let s:vim_plug_furl = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
let s:vim_plug_furl = 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
silent execute printf('!curl -fLo %s --create-dirs %s', g:vim_plug_fpath, s:vim_plug_furl)
|
silent execute printf('!curl -fLo %s --create-dirs %s', g:vim_plug_fpath, s:vim_plug_furl)
|
||||||
@ -19,10 +22,6 @@ if g:is_win || g:is_mac
|
|||||||
autocmd!
|
autocmd!
|
||||||
autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
|
autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
|
||||||
augroup END
|
augroup END
|
||||||
else
|
|
||||||
echoerr 'Curl not available on your system, you may install vim-plug by yourself.'
|
|
||||||
finish
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user