open-browser.vim
open-browser.vim copied to clipboard
Cannot open URL under cursor correctly if it is in single quote or parenteses
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.