Vim Tips Wiki

This is the documentation page for Template:Help

Use this template in a tip to add a link to the Vim Help documentation.


  1. {{help|topic}}
  2. {{help|id=topic}}
  3. {{help|id=topic|label=display}}
  4. {{help|tag=topic|label=display}}
  5. {{help|prefix=no|topic}}

When using the first form, the parameter topic:

  • Must not contain an equals character ('=').
  • Must not contain text that the wiki might mistake for an html tag.

For example, if topic is z= you would use {{help|id=z=}} (if you just have z=, the wiki thinks you are assigning an empty string to a parameter named z).

Use the third form if topic contains something looking like an html tag (example: <S-F1>).
The display text should be topic where you have replaced < with &lt; and > with &gt;.

In difficult cases, you can use the fourth form and encode topic and display – see Problem characters.

The prefix parameter can be set to no in order to hide the ":help " prefix of the link.


You should try to use the correct case for topic, although it usually does not matter. Following is an example showing how case-sensitivity can be important.

If topic does not contain = you can omit the id= and label= parameter names.
Warning: You have to omit them both, like this:

Problem characters

Using angle brackets (< or >) or square brackets ([ or ]) or a bar (|) can confuse the wiki.
A solution that should always work is to use:

  • {{help|tag=topic|label=display}}

where topic has been "url encoded" by substituting values from the Tag column in the table below, and display has been "escaped" by substituting values from the Label column.

Encoding problem characters
Character Tag Label
[ %5B &#91;
] %5D &#93;
< %3C &#60;
> %3E &#62;
| %7C &#124;


  • {{help|tag=%5D%5D|label=&#93;&#93;}} gives :help ]]
  • {{help|tag=%3CS-F1%3E|label=&#60;S-F1&#62;}} gives :help <S-F1>
  • {{help|tag=%7C|label=&#124;}} gives :help |

Quick Reference

Copy the following into a text file for a quick reference.

Example                           TOPIC             DISPLAY
{{help|TOPIC}}                    No = < > [ ] |
{{help|id=TOPIC}}                 No < > [ ] |
{{help|id=TOPIC|label=DISPLAY}}   No [ ] |          Use &lt; &gt;
{{help|tag=TOPIC|label=DISPLAY}}  Use %HH encoding  Use &#NN; encoding

Char Tag  Label
 [   %5B  &#91;
 ]   %5D  &#93;
 <   %3C  &#60;
 >   %3E  &#62;
 |   %7C  &#124;

Some topics (example <S-F1>) need to be encoded to avoid a wiki problem.
You should use the correct case (what Vim shows).

zE   {{help|zE}}
z=   {{help|id=z=}}
<    {{help|<|&lt;}}
]]   {{help|tag=%5D%5D|label=&#93;&#93;}}

Known bugs

  • Tags containing angle brackets, square brackets, or a bar, can give trouble with html or templates – see Problem characters.
  • The wiki seems to have a bug processing some tags beginning with <s-. The link created can be totally wrong. Use the Problem characters workaround.
  • Please add a comment at User_talk:JohnBeckett if you find a problem.

See also