12.3. Online Help and Other Documentation

vile currently comes with a single (rather large) ASCII text file, vile.hlp. The :help command (which can be abbreviated to :h) will open a new window on that file. You can then search for information on a particular topic, using standard vi search techniques. Because it is a flat ASCII file, it is also easy to print out and read through.

In addition to the help file, vile has a number of built-in commands for displaying information about the facilities and state of the editor. Some of the most useful commands are:

:show-commands

Creates a new window that shows a complete list of all vile commands, with a brief description of each one. The information is placed in its own buffer that can be treated just like any other vile buffer. In particular, it is easy to write it out to a file for later printing.

:apropos

Shows all commands whose names contain a given substring. This is easier than just randomly searching through the help file to find information on a particular topic.

:describe-key

Prompts you for a key or key sequence, and then shows the description of that command. For instance, the x key will implement the delete-next-character function.

:describe-function

Prompts you for a function name, and then shows the description of that function. For instance, the delete-next-character function deletes a given number of characters to the right of the current cursor position.

The :apropos, :describe-function, and :describe-key commands ...

Get Learning the vi Editor, Sixth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.