-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make space-vim able to be installed to location other than ~/.space-vim #485
Make space-vim able to be installed to location other than ~/.space-vim #485
Conversation
d849fc0
to
4d07216
Compare
30aa016
to
9bad0c6
Compare
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 #472 (comment) to README? |
1e879f6
to
20075bf
Compare
New Bug: layers/layers.py has incorrect path to info.vim
20075bf
to
1ec4485
Compare
Ok should be fine now. EDIT: A heads up that I'm working on two other PRs:
|
@@ -107,8 +107,8 @@ $ bash <(curl -fsSL https://raw.githubusercontent.com/liuchengxu/space-vim/maste | |||
#### Makefile | |||
|
|||
```bash | |||
$ git clone https://github.com/liuchengxu/space-vim.git ~/.space-vim | |||
$ cd ~/.space-vim | |||
$ git clone https://github.com/liuchengxu/space-vim.git /path/to/space-vim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking about if it could be better for the consistency favor to use a environment variable for space-vim location at all the places, like
$ export SPACE_VIM_LOCATION=/custom-path
$ git clone https://github.com/liuchengxu/space-vim.git "$SPACE_VIM_LOCATION/space-vim"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I apologize I didn't respond yet while I thought about it. While an environmental variable could be used in the installation directions I don't think it necessary.
I'd seen the /path/to/git-repository installation pattern used in this project:
git clone https://github.com/ingydotnet/git-subrepo /path/to/git-subrepo
echo 'source /path/to/git-subrepo/.rc' >> ~/.bashrc
Interesting and simple pattern.
I didn't really test this, but overall looks correct to me. Thank you! |
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.