I would like to open a url in vim. Using gx
from netrw has been problematic, so I created the following simple mapping:
nnoremap <leader>k !open <C-R><C-F><CR>
This gets the filepath under the cursor and then executes it, with the command looking like:
:!open http://google.com
However, I hate that whenever I open a file (or url) it prompts me with:
Press ENTER or type command to continue
So then I enter in silent
at the start:
:silent !open http://google.com
And it opens without that message, but when I go back to it the screen is blank, which is equally annoying.
Is there a way to just "open the link normally"? I.e., not the prompt me with a message, make the screen go blank, or anything other than opening the file/url on its own? How can I do this?