VIM: Open a File In a Web Browser on Linux
Today I learned two neat tricks:
Put your cursor on a link (in normal mode), and type
This will open the URL in a browser window.
What if you want to open a file in a web browser?
On Linux, you can type
:!xdg-open % to open the current file in the default browser.
(On a Mac, just type
If you want to make sure that your file is saved, you can first update the file and then pipe it through
:up | !xdg-open %