aboutsummaryrefslogtreecommitdiff
path: root/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2019-12-11 21:18:43 +0800
committerGitHub <noreply@github.com>2019-12-11 21:18:43 +0800
commit942109634a4b7042d199da19a72816fbfe88c034 (patch)
treec3b5f6f6fb1369db4b8cd02cc9ee7a61e0bb9f4d /plugins.vim
parentf225543f20cde9f7343c4e1855b589ac94682f78 (diff)
Update vim-plug install logic
Diffstat (limited to 'plugins.vim')
-rw-r--r--plugins.vim11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins.vim b/plugins.vim
index 8c41206..a1e872a 100644
--- a/plugins.vim
+++ b/plugins.vim
@@ -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