9

gvim help doc contains "links",I can jump to subject by hit ctrl+] How to format a text which can functioning like that

3 Answers 3

8

There is a section in the help dedicated to that topic : "Writing help files"

See : help help-writing or :help helphelp.txt

Excerpt :

TAGS


To define a help tag, place the name between asterisks (*tag-name*). 

(...)

When referring to an existing help tag and to create a hot-link, place the
name between two bars (|) eg. |help-writing|.

To get more details, please read the previously mentioned help files.

Sign up to request clarification or add additional context in comments.

Comments

5

Vim's help files exist in $VIMRUNTIME/doc, so if you view these files and set

set syntax=off

this will give you an idea of the mark-up. Basically you create links by enclosing them in pipes:

go to a link |here|

which will jump to an occurrence of the link text enclosed in asterisks, i.e. *here*.

Then you just need to do

set filetype=help

for your files, which you can achieve with an autocommand.

Comments

1

It is required to run command:

:helpt[ags] {dir}

to generate new tags after file is created. Details can be found:

:help helpt

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.