Open astier opened 3 years ago
Hi, what OS are you using? I'm not able to replicate it with fedora 34. Also, does this also happens when using the default gx implementation (without this plugin press gx over a full url like https://github.com)
Arch Linux. Native gx
doesn't work. I set let g:netrw_browsex_viewer= "xdg-open"
. It tries do download something. Opens a new buffer. Sometimes it shows the download url in the browser but its not the proper website.
Opening the same website with xdg-open from the terminal works.
If no firefox window is open and I try to open a website with firefox from the terminal than also firefox doesn't go to the background in the terminal. Basically the terminal 'hangs' with firefox (I don't know the proper terminology) until I press
If a firefox-window is already open than the website simply opens up in a new tab in the already existing firefox-window.
Can it be that you have some kind of firefox-deamon running in the background? Could you reproduce it in the terminal?
hey @astier, you found a solution to your problem?
No.
I made hacky solution:
let g:gxext#opencmd = '/bin/sh -c "your-browser \"\$1\" & disown" sh'
(replace your-browser
with your browser name)
How it works: main thing to make browser starting in background is & disown
part. But as plugin expands opencmd
variable into <opencmd> <url>
, we needed to make such opencmd
command which accepts url as very latest argument (because we have no placeholders like %s
in C, if you know...). So here is /bin/sh -c ...
hack.
System
Problem
If the browser is not already open and
gx
is used to open a link then the browser opens with the correct site, however vim freezes until the browser is closed. If the browser is already open before executinggx
then it works as expected and vim doesn't freeze.vimrc
Reproduce
Plug 'stsewd/gx-extended.vim'
gx