aboutsummaryrefslogtreecommitdiff
path: root/plugins.vim
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2020-08-12 16:06:59 +0800
committerGitHub <noreply@github.com>2020-08-12 16:06:59 +0800
commita9e4c1de85bc7281c9b4a8a31ac7091d82868515 (patch)
tree8744809878ab14d4f89e6737a45ea47c8661ab68 /plugins.vim
parent63e6a47263c104683737e6f20b6f8c141551c47a (diff)
Only Install vim-plug on Windows or Mac inside config
Diffstat (limited to 'plugins.vim')
-rw-r--r--plugins.vim28
1 files changed, 15 insertions, 13 deletions
diff --git a/plugins.vim b/plugins.vim
index 3969e27..6938e6b 100644
--- a/plugins.vim
+++ b/plugins.vim
@@ -8,21 +8,23 @@
" 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_PATH = expand(g:nvim_config_root . '/autoload/plug.vim')
-if executable('curl')
+if g:is_win || g:is_mac
if empty(glob(g:VIM_PLUG_PATH))
- echomsg 'Installing Vim-plug on your system'
- silent execute '!curl -fLo ' . g:VIM_PLUG_PATH . ' --create-dirs '
- \ . 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
-
- augroup plug_init
- autocmd!
- autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
- augroup END
+ if executable('curl')
+ echomsg 'Installing Vim-plug on your system'
+ silent execute '!curl -fLo ' . g:VIM_PLUG_PATH . ' --create-dirs '
+ \ . 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
+
+ augroup plug_init
+ autocmd!
+ autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
+ augroup END
+ else
+ echoerr 'Curl must be available to install vim-plug, or you may install '
+ \ . 'vim-plug by yourself.'
+ finish
+ endif
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