One of the first things you learn in vimtutor is to follow links in the vim help files with Ctrl-]. I'm interested in creating my own tags/linking system in arbitrary files. For the sake of this question, let's say I'm creating a sort of TODO list in markdown.
Suppose that we have the following minifile:
TODO
=====
1. Learn Vimscript the Hard Way |hardway|
(some other things, maybe)
Complete Learn Vimscript the Hard Way
------------------------------------- :hardway
(Some sort of details, etc.)
Then the goal would be to put the cursor on the first |hardway|
, hit something akin to Ctrl-], and be transported to the :hardway
tag located elsewhere. Ideally, this could even occur if :hardway
was in a different file (but maybe the same directory).
I currently use a low-tech alternative. Instead of |hardway|
, I would have something like |hardway.md|
, so that I can gf on the "tag" and ge taken to the hardway.md
file. While this is manageable, I feel like it should be possible (maybe even not hard) to create and maintain my own tag system on arbitrary filetypes.
:h hardway
and being taken to my entry onhardway
which is actually a helpfile. Or perhaps I'm misunderstanding your suggestion? Forgive me, I'm not entirely certain.