Closed delvatt closed 2 years ago
A critique of the SpaceVim project is the install.sh script, which also holds for this space-vim project. Which I completely agree with for what is essentially a single vimrc. IMO manually installing using the ~3 lines and doing away with install.sh/uninstall.sh would be better for end-users and maintainers:
$ git clone https://github.com/liuchengxu/space-vim.git /path/to/space-vim
# For Vim
$ ln -s /path/to/space-vim/init.vim ~/.vimrc
# For NeoVim
$ ln -s /path/to/space-vim/init.vim ~/.config/nvim/init.vim
$ vim -es +'PlugInstall' +qall
In the spirit of this project essentially being a single vimrc, I disagree with the use of the $HOME/.spacevim file being separated out into the $HOME folder to "configure" this vim configuration. As if there is a systemwide install of space-vim, and each user has their own 'configuration'. I think instead of a systemwide install, each user should have their own space-vim copy, and the configuration solely within that copy, not separated out from that copy into the $HOME folder.
Consider the distinction between /etc/vim/vimrc and /etc/vim/vimrc.local, both in the same folder, where vimrc.local is sourced by vimrc and provides configuration.
In init.vim this appears to work for me:
let g:spacevim.base = fnamemodify(resolve(expand('<sfile>:p')),':h')
...
let &runtimepath = &runtimepath . ',' . g:spacevim.base . '/core'
And core/autoload/spacevim.vim:
let s:dot_spacevim = g:spacevim.base.'/init.spacevim'
...
call spacevim#util#err(s:dot_spacevim.' does not exist! Exiting...')
Environment
Please complete these steps and check these boxes (by putting an
x
inside the brackets) before filing your issue:Put the contents of
:version
below:Put the contents of
:SpaceInfo
below:Problem Description
Space-vim could be even more flexible if we could support a custom install folder, instead of the hardcoded $HOME?.space-vim. This implies mostly 2 cases:
For existing installations: being able to move your installation to anywhere it pleases you.
This already works out of the box for space-vim, assuming you properly updated the values of g:spacevim.base and runtimepath to your new installation path, inside your init.vim config file; with a little warning displayed that states that space-vim failed to generate helptags. This warning is a direct consequence of issue #470 and is easily fixed by pr #471
For new installations: being able to provide an installation path.
Of course this is a change that need to be discussed, An example might be:
Backward compatible and defaults to $HOME?.space-vim
Use current directory as install folder:
Specify a full path for install folder:
For this to work, we need to make the necessary changes in the appropriate files, ie install.sh, install.cmd, init.vim and uninstall.sh