GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
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.
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 <Control-F6> to follow the URL in the WORD under the text cursor.
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?
Use HTTP HEAD to disambiguate URLs with trailing punctuation (issue #4)
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.