aboutsummaryrefslogtreecommitdiff
path: root/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-09-27 19:16:55 +0800
committerjdhao <jdhao@hotmail.com>2020-09-27 19:16:55 +0800
commit32d69040d6f02cc1c17f8991eb240c024105d5d9 (patch)
tree5f619e5575f287651b1620d057bce87688463c54 /plugins.vim
parenteb7df6b06c31164620c3e49f39d7aa0399f2e7b0 (diff)
update vim-plug install logic
Diffstat (limited to 'plugins.vim')
-rw-r--r--plugins.vim17
1 files changed, 8 insertions, 9 deletions
diff --git a/plugins.vim b/plugins.vim
index a7d1ea3..1cd0569 100644
--- a/plugins.vim
+++ b/plugins.vim
@@ -11,18 +11,17 @@ scriptencoding utf-8
let g:vim_plug_fpath = expand(stdpath('data') . '/autoload/plug.vim')
if g:is_win || g:is_mac
if empty(glob(g:vim_plug_fpath))
- if executable('curl')
- echomsg 'Installing Vim-plug on your system'
- 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)
- augroup plug_init
- autocmd!
- autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
- augroup END
- else
+ 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'
+ 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)
+ augroup plug_init
+ autocmd!
+ autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
+ augroup END
endif
endif