Skip to content

Cannot open URL under cursor correctly if it is in single quote or parenteses #167

@phongnh

Description

@phongnh

Hi,

This issue happened when opening url under cursor if url is in single quote or parentheses, step to reproduce as follows:

nmap go <Plug>(openbrowser-smart-search)
" Or
" nmap go <Plug>(openbrowser-open)
" Or you can use go or gx or any key you want

Case 1:

Plug 'https://git.sr.ht/~ackyshake/VimCompletesMe.vim'

Place cursor under url, then press above mapping go, it is opening https://git.sr.ht/~ackyshake/VimCompletesMe.vim' in browser

Case 2

('https://git.sr.ht/~ackyshake/VimCompletesMe.vim')

Place cursor under url, then press above mapping go, it is opening https://git.sr.ht/~ackyshake/VimCompletesMe.vim') in browser

If I replace ' with " in both above cases, it can open url correctly. It is quite strange.

Case 3

(https://git.sr.ht/~ackyshake/VimCompletesMe.vim)

Place cursor under url, then press above mapping go, it is opening https://git.sr.ht/~ackyshake/VimCompletesMe.vim) in browser.
I also tested with [] and {}, it works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions