Skip to content
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

$HOME environment variable not being interpreted under Windows #14

Closed
mrbrich opened this issue Mar 26, 2014 · 3 comments
Closed

$HOME environment variable not being interpreted under Windows #14

mrbrich opened this issue Mar 26, 2014 · 3 comments

Comments

@mrbrich
Copy link

mrbrich commented Mar 26, 2014

Under Windows, when I run :PlugInstall the packages are downloaded to an incorrect location. Instead of putting them under vimfiles\plugged in the directory pointed to by my $HOME environment variable (e.g. C:\Users), a directory named '$HOME' (literally) is created under the current directory and the files placed there. In other words, it is as if the $HOME variable is not being interpreted as a variable, but taken as a literal string.

p.s. I know Windows may not be your priority, but it would still be nice to fix this issue. Thanks for a great tool.

junegunn added a commit that referenced this issue Mar 26, 2014
@junegunn
Copy link
Owner

Hmm, the latest commit might fix this problem as well.
Please update and let me know of the result.

If you still see the problem, I'd like to ask you a couple of questions.

  • Do you pass argument to plug#begin()? (Something like plug#begin('~/vimfiles/plugged') or just plug#begin() ?)
  • What is the value of g:plug_home after plug#end() call?

@mrbrich
Copy link
Author

mrbrich commented Mar 26, 2014

That was the problem, I was passing the argument like this:

call plug#begin('$HOME/vimfiles/plugged')

I changed it to

call plug#begin('~/vimfiles/plugged')

and problem solved! Sorry, I don't know where that came from. Anyways, thanks.

@mrbrich mrbrich closed this as completed Mar 26, 2014
@junegunn
Copy link
Owner

No problem. Actually plug#begin() does not try to expand $SOMETHING-form in the argument. So it's the expected behavior. Instead you can build the string yourself like so: plug#begin($HOME . '/vimfiles/plugged')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants