1
0
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:
jdhao 2019-12-11 21:18:43 +08:00 committed by GitHub
parent f225543f20
commit 942109634a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,11 +6,8 @@
" Windows 10 build 17063, source: http://tinyurl.com/y23972tt).
" The following script to install vim-plug is adapted from vim-plug
" wiki: https://github.com/junegunn/vim-plug/wiki/tips#tips
if !executable('curl')
echomsg 'You have to install curl to install vim-plug. Or install '
\ . 'vim-plug yourself following the guide on vim-plug git repo'
else
let g:VIM_PLUG_PATH = expand(g:nvim_config_root . '/autoload/plug.vim')
let g:VIM_PLUG_PATH = expand(g:nvim_config_root . '/autoload/plug.vim')
if executable('curl')
if empty(glob(g:VIM_PLUG_PATH))
echomsg 'Installing Vim-plug on your system'
silent execute '!curl -fLo ' . g:VIM_PLUG_PATH . ' --create-dirs '
@ -21,6 +18,10 @@ else
autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
augroup END
endif
else
echoerr 'You have to install curl to install vim-plug, or install '
\ . 'vim-plug by yourself.'
finish
endif
" Set up directory to install the plugins based on whether you are installing