-
Notifications
You must be signed in to change notification settings - Fork 3
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
Port URL regex to vimscript #1
base: master
Are you sure you want to change the base?
Conversation
Fixing the mapping to use noremap; deferring the question of whether this plugin should map at all. See also: http://stevelosh.com/blog/2011/09/writing-vim-plugins/
Thank you! Looking through the pull request; will drop some comments as I go. Out of curiosity, is the |
Re: "deferring the question of whether this plugin should map at all", I suppose you mean this. Good point; I should fix that. |
Hm, actually, I see there is already a |
Script fails: a missing on line 17 and the wrong method name on line 13. Even with those fixed, nothing happens. Could you make sure it works for you and reopen the issue after that? Had it run, I would also have verified that it handles multiple URLs on the same line, since it looks from the code like it might not. I think this modified plugin doesn't provide any feedback if it finds no matching URL on the current line, either. I suppose I could do without that if it's very hard to achieve. All this notwithstanding, I'm very impressed you ported the regexp. I'm sure it was hard and painful work :) |
Hi @henrik, thanks for the review. Regarding the
I also noted after submitting the PR that the original code specifies behavior for multiple URLs on the same line. My branch definitely has no special handling for this case; it should just grab the first URL on a line. I'll review the original behavior and see what it would take to preserve it in this port. |
@jwhitley Sounds great. Thanks so much for taking the time! |
@henrik I've updated my branch with a now-working version that restores proper user feedback, but which does not yet handle multiple URLs. I'd like to get vspec tests in using the DF test set in place as well. FYI, I don't seem to be able to reopen this PR, and it isn't showing my most recent updates while closed. |
Oh, suppose only I can reopen. Done! Will hopefully look at the updates later today. Tests would be very cool. Great problem for it. |
FYI, |
@raneksi Ooh, interesting. Not quite the same thing: @jwhitley So sorry I've been ignoring this. Hope to find the time and inclination later during this vacation, but no promises I'm afraid. |
This change ports John Gruber's URL regex to Vim's regex format and removes the ruby dependency.