liuchengxu / space-vim

:four_leaf_clover: Lean & mean spacemacs-ish Vim distribution
https://liuchengxu.github.io/space-vim/
MIT License
2.85k stars 255 forks source link

Make space-vim able to be installed to location other than ~/.space-vim #485

Closed rene-descartes2021 closed 2 years ago

rene-descartes2021 commented 3 years ago

Fixes #472.

New Bug: layers/layers.py has incorrect path to info.vim But I suppose this isn't a big issue as layers/layers.py appears to be a helper script which generates https://github.com/liuchengxu/space-vim/blob/master/layers/LAYERS.md, which is something I imagine only the maintainer does, and not an end-user.

From my understanding this python script doesn't have access to g:spacevim.base (in vimscript). A fix I can think of off the top of my head would be to store info.vim in a cache directory, accessible from an environmental variable like $XDG_RUNTIME_DIR/vim or $TMPDIR/vim-$USER, But, such a fix would be outside the scope of this commit. Another possible fix would be a check in python verifying the the installation is to ~/.space-vim

EDIT: Altered the .gitignore in order to better facilitate /path/to/spacevim being ~/.vim if the end-user chooses that install location.

liuchengxu commented 3 years ago

Thanks a lot for this PR! Looks good to me. Do you mind also adding the instructions for installing space-vim in a custom folder you mentioned in https://github.com/liuchengxu/space-vim/issues/472#issuecomment-910788004 to README?

rene-descartes2021 commented 3 years ago

Ok should be fine now.

EDIT: A heads up that I'm working on two other PRs:

  1. A rename of init.vim to vimrc and init.spacevim to vimrc.local like I mentioned earlier in #472.

    • For vim all that is needed is a clone to ~/.vim and no symbolic links needed... maybe that should be standard install directions for vim.
    • vimrc.local is versioned now via git, I think this is more intuitive change for end-users than ~/.spacevim
    • Should allow for removal of install scripts (not useful for end-users). Moved install scripts to ci/, I assume that's an ok place for them, or can delete them.
  2. And a csharp layer. Needs more thought before I'll make PR.

liuchengxu commented 2 years ago

I didn't really test this, but overall looks correct to me. Thank you!