diff options
| author | jdhao <jdhao@hotmail.com> | 2020-09-27 20:27:50 +0800 |
|---|---|---|
| committer | jdhao <jdhao@hotmail.com> | 2020-09-27 20:27:50 +0800 |
| commit | a54a20d2996da9ebd0521a651a7fba5e268f7d1f (patch) | |
| tree | 2f7fb045e35f1299fe45769618ed68c445965902 /plugins.vim | |
| parent | a94be81fb5f8d61f30bacc720365196372adf06b (diff) | |
refactor: vim-plug install
Diffstat (limited to 'plugins.vim')
| -rw-r--r-- | plugins.vim | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/plugins.vim b/plugins.vim index 6e15788..be031dd 100644 --- a/plugins.vim +++ b/plugins.vim @@ -9,20 +9,18 @@ scriptencoding utf-8 " The following script to install vim-plug is adapted from vim-plug " wiki: https://github.com/junegunn/vim-plug/wiki/tips#tips 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') - 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 +if (g:is_win || g:is_mac) && empty(glob(g:vim_plug_fpath)) + 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 " The directory to install plugins. |
