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

wildcard option breaks expand and causes errors #50

Closed
volo1st opened this issue May 16, 2017 · 4 comments
Closed

wildcard option breaks expand and causes errors #50

volo1st opened this issue May 16, 2017 · 4 comments

Comments

@volo1st
Copy link

volo1st commented May 16, 2017

Environments:

  • Ubuntu 14.04 LTS
  • NeoVim v0.2.0

Steps to replicate:

mkdir static
cd static
touch test.md
nvim test.md

and you will see this error:
waka

@alanhamlett
Copy link
Member

alanhamlett commented May 18, 2017

Unable to reproduce this issue.

Tested with Ubuntu 16.04 and NeoVim 0.1.7.

@volo1st
Copy link
Author

volo1st commented May 19, 2017

After some digging with isolated vim config, the root cause is this line in my vim config:
set wildignore+=*/static/*
which somehow makes vim-wakatime cannot find the file.
It is still weird though why the error message saying

E482: Can't open file /.wakatime.cfg for writing: permission denied

which is a bit misleading

@alanhamlett
Copy link
Member

Thanks for figuring it out, you can add that back to your vimrc after updating the vim-wakatime plugin since it's been fixed now.

When a wildcard pattern matches the folder Vim/NeoVim is opened from it causes expand('~') to return empty string instead of your home directory. Setting &wildcard to empty string temporarily while loading the plugin fixed it.

@alanhamlett alanhamlett changed the title Path contains static causes errors wildcard option breaks expand and causes errors May 19, 2017
@volo1st
Copy link
Author

volo1st commented May 19, 2017

Thanks for the nice explanation, the fix work like a charm!

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