diff --git a/core/autoload/spacevim.vim b/core/autoload/spacevim.vim index 92d98bf1..35d039ff 100644 --- a/core/autoload/spacevim.vim +++ b/core/autoload/spacevim.vim @@ -1,5 +1,6 @@ scriptencoding utf-8 + let g:spacevim.info = g:spacevim.base. '/core/autoload/spacevim/info.vim' let g:spacevim.layers_base = '/layers' let g:spacevim.private_base = '/private' @@ -40,7 +41,9 @@ function! spacevim#begin() abort endfunction function! s:check_vim_plug() abort - let l:plug_path = g:spacevim.nvim ? '~/.local/share/nvim/site/autoload/plug.vim' : '~/.vim/autoload/plug.vim' + "let l:plug_path = g:spacevim.nvim ? '~/.local/share/nvim/site/autoload/plug.vim' : '~/.vim/autoload/plug.vim' + "let l:plug_path = '~/.cache/space-vim/site/autoload/plug.vim' + let l:plug_path = g:spacevim_plugvim_filepath if empty(glob(l:plug_path)) | call spacevim#vim#plug#download(l:plug_path) | endif endfunction diff --git a/init.spacevim b/init.spacevim index 8f34bec5..d651607b 100644 --- a/init.spacevim +++ b/init.spacevim @@ -1,6 +1,8 @@ " Comment the following line if you don't want Vim and NeoVim to share the " same plugin download directory. -let g:spacevim_plug_home = '~/.vim/plugged' +"let g:spacevim_plug_home = '~/.vim/plugged' +"let g:spacevim_plug_home = '~/.cache/space-vim/plug' +let g:spacevim_plug_home = g:spacevim_plugvim_cachepath . '/plug' " Uncomment the following line to override the leader key. The default value is space key "<\Space>". " let g:spacevim_leader = "<\Space>" diff --git a/init.vim b/init.vim index 91f1f7cc..ef1d444d 100644 --- a/init.vim +++ b/init.vim @@ -35,6 +35,27 @@ if g:spacevim.os.windows endif " } + +"" +"" core runtimepath +"" + let &runtimepath = &runtimepath . ',' . g:spacevim.base . '/core' + +"" +"" plug.vim runtimepath +"" + +let g:spacevim_plugvim_cachepath = '~/.cache/space-vim' +let g:spacevim_plugvim_runtimepath = g:spacevim_plugvim_cachepath . '/site' +let g:spacevim_plugvim_filepath = g:spacevim_plugvim_runtimepath . '/autoload/plug.vim' + +let &runtimepath = g:spacevim_plugvim_runtimepath . ',' . &runtimepath + + +"" +"" bootstrap +"" + call spacevim#bootstrap()