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
|
" 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
|
||||||
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 g:is_win || g:is_mac
|
||||||
if empty(glob(g:VIM_PLUG_PATH))
|
if empty(glob(g:VIM_PLUG_PATH))
|
||||||
echomsg 'Installing Vim-plug on your system'
|
if executable('curl')
|
||||||
silent execute '!curl -fLo ' . g:VIM_PLUG_PATH . ' --create-dirs '
|
echomsg 'Installing Vim-plug on your system'
|
||||||
\ . 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
silent execute '!curl -fLo ' . g:VIM_PLUG_PATH . ' --create-dirs '
|
||||||
|
\ . 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||||
|
|
||||||
augroup plug_init
|
augroup plug_init
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
|
autocmd VimEnter * PlugInstall --sync | quit |source $MYVIMRC
|
||||||
augroup END
|
augroup END
|
||||||
|
else
|
||||||
|
echoerr 'Curl must be available to install vim-plug, or you may install '
|
||||||
|
\ . 'vim-plug by yourself.'
|
||||||
|
finish
|
||||||
|
endif
|
||||||
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