Tuesday, July 9, 2019

Re: follow link on internet with vim

On 7/9/2019 5:56 AM, Mathieu Roux wrote:
>
> Is it possible to follow a link with vim? for exemple, if my cursor is
> on https://fr.wikipedia.org/wiki/Vim
> i want to use my browser to go to this website.
>
> By the same way, i can open a file with "gf" if my cursor is on the
> file's name. But i don't know how to follow a link.
>

On Windows, when the following lines are in vimrc, the stuff below the
cursor can be opened with the default browser by hitting "\x" (below,
the "essential" characters that come after noremap need to be in the
same line):

"eXecute string below cursor
nnoremap \x :silent !start rundll32 url.dll,FileProtocolHandler <cWORD>
" eXecute string below cursor after prepending it with path to file
nnoremap \xp :silent !start rundll32 url.dll,FileProtocolHandler
%:p:h/<cWORD>

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/099ec4e6-8f95-9000-56d0-b51e52922b6e%40yahoo.com.
For more options, visit https://groups.google.com/d/optout.

No comments: