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