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

vim-project was not working on mac #4

Closed
wants to merge 1 commit into from
Closed

Conversation

zmre
Copy link

@zmre zmre commented Jun 8, 2013

Thanks for the great project. Sadly, it wasn't working on the mac using vim 7.3-66. The BufEnter auto command was never triggering since it looked something like /path/to/project//* and was failing to match everything.

My fix is to change the order of operations in the full_path function to strip the trailing slash after calling resolve. With this change, things work beautifully.

On mac, the resolve() function was adding a trailing slash.  Reorder
the substitutions to fix.
@amiorin
Copy link
Owner

amiorin commented Jun 8, 2013

I've made the same fix this morning, but I didn't push it yet. :-)

function! s:full_path(arg) abort
  let arg = substitute(a:arg, '\v\C/+$', '', '')
  let arg = resolve(fnamemodify(arg, ":p"))
  let arg = substitute(arg, '\v\C\\+$', '', '')
  let arg = substitute(arg, '\v\C/+$', '', '')
  return arg
endfunction

We need to remove two times the trailing slash, because of Microsoft Windows (IRC).

@zmre
Copy link
Author

zmre commented Jun 8, 2013

I was afraid there was a reason for the ordering to begin with. Glad you're on top of it. I'm just getting going with this plugin, but so far... two thumbs up!

@amiorin amiorin closed this in 8147096 Jun 8, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants