1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 327 forks source link

Option for bespoke TLDs #225

Open mrkyle7 opened 9 years ago

mrkyle7 commented 9 years ago

When opening a URL with a non-standard TLD (like intranet sites at work), this opens a search by default.

Can we have the option of applying our own TLDs in the settings?

1995eaton commented 9 years ago

I just pushed a commit that will treat a search as a URL if you append a slash (or full path) after the entry. For example, the-url/ will open http://the-url. Is this what you had in mind?

mrkyle7 commented 9 years ago

The main problem I have is opening pages from history.

E.g. http://wiki.abcd/my_favourite

In this case, because it doesn't end in a slash and .abcd is not a recognised TLD, it opens as a search.

A workaround is to select then add "=" on the end, but would be nice to have a variable like:

let customTLDs = [ 'abcd', 'def']

1995eaton commented 9 years ago

Try using the GitHub version of cVim (or updating if you already are). The URL you provided is interpreted as a URL for me.

mrkyle7 commented 9 years ago

I'm on 1.2.67 (which I think is the latest version) - and opening that URL defaults to: https://www.google.co.uk/search?q=http://wiki.abcd/my_favourite&qscrl=1&gws_rd=cr&ei=7tXQVP_xDYrpaPiMgIAJ

1995eaton commented 9 years ago

Still not seeing this issue. Make sure your Git tree is at least up to 04c4394. I haven't updated the version number to 1.2.68 yet (I only do that when I upload several commits to the Chrome store), so you'll still see the version as 1.2.67.