arp242 / xdg_open.vim

Run xdg-open from Vim; re-implements netrw's gx.
MIT License
11 stars 4 forks source link

Tries to open everything with a browser #1

Closed averms closed 2 years ago

averms commented 4 years ago

When I edit a file and press gx on something like

/home/user/picture.png

Chrome opens a new tab and with home/user/picture.png. I did some debugging and I found out that the xdg open command that runs is

xdg-open http:///home/user/picture.png

I have a fork that fixes this and a few other things. Let me know if you want me to clean it up and open a pull req.

arp242 commented 4 years ago

Yeah, the main use case I made it for is opening stuff in the browser. PRs always welcome!

arp242 commented 2 years ago

I spent some time on this today, and this should be fixed now; gx always opens a path, and gX always an URL. This allows both opening local files and URLs like example.com/path.