LESSKEY — User Commands
NAME
lesskey − specify key bindings for less
SYNOPSIS
lesskey [-o output] [input]
DESCRIPTION
Lesskey is used to specify a set of key bindings to be used by less. The input file is a text file which describes the key bindings, and the output file is a binary file which is used by less. If no input file is specified, standard input is used. If no output file is specified, $HOME/.less is used.
The input file consists of lines of the form: string <whitespace> action [extra-string] <newline> Whitespace is any sequence of one or more spaces and/or tabs. The "string" is the command key(s) which invoke the action. The string may be a single command key, or a sequence of up to 15 keys. The "action" is the name of the less action, from the list below. The characters in the "string" may appear literally, or be prefixed by a carat to indicate a control key. A backslash may be used to cause the following character to be taken literally. Characters which must be preceded by backslash include carat, space, tab and the backslash itself. A backslash followed by one to three octal digits may be used to specify a character by its octal value. Blank lines and lines which start with a pound sign (#) are ignored.
An action may be followed by an extra string. This string is parsed after the command is entered, just as if it were entered on the command line. This feature can be used in certain cases to extend the functionality of a command. For example, these entries would create a pair of commands to turn on/off line numbers using vi syntax:
:set\ nutoggle-option -N
:set\ nonutoggle-option +N
See also the ":ta" command in the example below.
EXAMPLE
The following input file describes the set of default command keys used by less:
rforw-line
nforw-line
eforw-line
jforw-line
^Eforw-line
^Nforw-line
kback-line
yback-line
^Yback-line
^Kback-line
^Pback-line
Jforw-line-force
Kback-line-force
Yback-line-force
dforw-scroll
^Dforw-scroll
uback-scroll
^Uback-scroll
’back-scroll
\40forw-screen
fforw-screen
^Fforw-screen
^Vforw-screen
bback-screen
^Bback-screen
\33vback-screen
zforw-window
wback-window
Fforw-forever
Rrepaint-flush
rrepaint
^Rrepaint
^Lrepaint
ggoto-line
<goto-line
\33<goto-line
ppercent
%percent
{forw-bracket {}
}back-bracket {}
(forw-bracket ()
)back-bracket ()
[forw-bracket []
]back-bracket []
\33^Fforw-bracket
\33^Bback-bracket
Ggoto-end
\33>goto-end
>goto-end
Pgoto-end
=status
^Gstatus
:fstatus
/forw-search
?back-search
\33/forw-search ∗
\33?back-search ∗
nrepeat-search
\33nrepeat-search-all
Nreverse-search
\33Nreverse-search-all
mset-mark
’goto-mark
^X^Xgoto-mark
Eexamine
:eexamine
^X^Vexamine
:nnext-file
:pprev-file
:xindex-file
-toggle-option
:ttoggle-option t
stoggle-option o
_display-option
|pipe
vvisual
!shell
+firstcmd
Hhelp
hhelp
Vversion
qquit
:qquit
:Qquit
ZZquit
\33\33quit
Commands specified by lesskey take precedence over the default commands. A default command key may be disabled by including it in the key file with the action "invalid".
SEE ALSO
Sprite version 1.0 —