mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Only Install vim-plug on Windows or Mac inside config
This commit is contained in:
parent
63e6a47263
commit
a9e4c1de85
26
plugins.vim
26
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'
|
||||
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
|
||||
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user