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
Fail to open URL with dot at the end #4
Comments
This is by design: 9 out of a 10 times I would want the plug-in to ignore the trailing dot, so it does. In fact it explicitly ignores all trailing punctuation. The underlying problem is that detecting the end of a URL is quite hard, there is no explicit delimiter and because URLs are embedded in human readable text they're frequently followed by unrelated punctuation. I could make an option that controls this behavior:
However instead of introducing this configuration option I would rather have the plug-in work for everyone out of the box. Unfortunately I'm pretty much sure this is impossible without performing a HEAD request to see which of the two URLs (with and without trailing dot) is valid :-P. One other possibility is to introduce another key binding, for example Since you opened the case, do you have a preference for any of the above options? Or maybe you have other suggestions? |
I would prefer the HEAD solution because there are so many other still cool vim shortcuts out there that doesn't fit in my brain without sufficient training. What is your estimation about the effort you have to put into this feature? |
Hi Matthias, I've just published a new release of the vim-shell plug-in that includes a bit of Python to disambiguate URLs with trailing punctuation. I've tried it out on the URL you gave and it does the right thing now. I hope your Vim was compiled with Python support; I forgot to mention previously that Vim script doesn't support network sockets so the "HEAD solution" requires another programming language to check URLs for validity. To enable this feature you have to set the new g:shell_verify_urls option to 1 in your vimrc script. I hope this resolves your issue!
|
Works like a charm, I highly appreciate your great work you put in this plugin. |
Hi there,
if I try to open https://github.com/vim-scripts/SuperTab-continued. with pressing it will fire up the browser with the URL https://github.com/vim-scripts/SuperTab-continued - so it doesn't parse the dot at the end of the file.
The text was updated successfully, but these errors were encountered: