I need to set some text to be hyperlinked to a website via the vim editor. How do I accomplish that?
Vim is not a word processor. Vim displays text exactly as it is on the disk. You can do some minor "formatting" of text such as folding lines, syntax highlighting, concealing a few characters, but that's it. None of this information is actually stored in the file itself, instead, it is applied from "outside the file" with Vim. This is different from .doc
files, where the formatting is stored in the file.
Note that gx
opens links. Perhaps this is what you want?
What you want can maybe be done with:
A conceal
pattern combined with some custom mappings. I haven't tried doing this, but it's probably possible.
The only way to "link" something in Vim is to another file using tags. See :help tags-and-searches
. Perhaps this feature can be abused into opening web pages, I don't suggest that you try.
In short, you're trying to use Vim for a task it wasn't really designed to do, so doing that will be hard and ugly, if possible at all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With