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

<Plug>(openbrowser-open) should open selected URL as-is in visual mode #76

Open
tyru opened this issue Dec 31, 2015 · 1 comment
Open

Comments

@tyru
Copy link
Owner

tyru commented Dec 31, 2015

Problem

Currently, <Plug>(openbrowser-open) and <Plug>(openbrowser-smart-search) can't open the below URL (:OpenBrowser can open it though).
This bug was introduced by #72 and #73 fix.
https://ja.wikipedia.org/wiki/%E3%83%97%E3%83%AD%E3%82%B0%E3%83%A9%E3%83%9F%E3%83%B3%E3%82%B0_(%E3%82%B3%E3%83%B3%E3%83%94%E3%83%A5%E3%83%BC%E3%82%BF)

Solution

<Plug>(openbrowser-open) and <Plug>(openbrowser-smart-search) should open selected URL as-is in visual-mode.
Allow any string (including any character ', '(', ')', or Unicode character) and just pass the string to a browser.
Currently, the mappings search URLs from given string, and open it.

Here are the expected behaviors for each keymapping, ex-command.

Keymappings(Normal mode) Keymappings(Visual mode)*1 <Plug>(openbrowser-smart-search)
Loose PatternSet*2 Allow any string Allow any string*4
Ex-commands*3 :OpenBrowserSmartSearch
Allow any string Allow any string*4

*1: Excluding <Plug>(openbrowser-smart-search)
*2: Allowed characters in RFC3986 excluding ', (, ) #72
*3: Excluding :OpenBrowserSmartSearch
*4: If selected text starts with {scheme}://, open it as URL. Otherwise, open it as filepath.

@tyru tyru changed the title <Plug>(openbrowser-open) should open selected URL as-is in visual-mode <Plug>(openbrowser-open) should open selected URL as-is in visual mode Jan 1, 2016
@y
Copy link

y commented Jul 10, 2016

I think this is the same problem I'm having with this perfectly valid url:
http://google.com/search?q=("this"+OR+"that")&tbs=qdr:w&filter=0

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

No branches or pull requests

2 participants