Annotation of src/usr.bin/less/lesskey.man, Revision 1.1
1.1 ! etheisen 1:
! 2:
! 3:
! 4: LESSKEY(1) USER COMMANDS LESSKEY(1)
! 5:
! 6:
! 7:
! 8: NAME
! 9: lesskey - specify key bindings for less
! 10:
! 11: SYNOPSIS
! 12: lesskey [-o output] [input]
! 13: lesskey -V
! 14:
! 15: DESCRIPTION
! 16: _L_e_s_s_k_e_y is used to specify a set of key bindings to be used
! 17: by _l_e_s_s. The input file is a text file which describes the
! 18: key bindings, If the input file is "-", standard input is
! 19: read. If no input file is specified, $HOME/.lesskey is
! 20: read. The output file is a binary file which is used by
! 21: _l_e_s_s. If no output file is specified, $HOME/.less is writ-
! 22: ten. If the output file already exists, _l_e_s_s_k_e_y will
! 23: overwrite it.
! 24:
! 25: The input file consists of lines of the form:
! 26:
! 27: _s_t_r_i_n_g <whitespace> _a_c_t_i_o_n [extra-string] <newline>
! 28:
! 29: Whitespace is any sequence of one or more spaces and/or
! 30: tabs. The _s_t_r_i_n_g is the command key(s) which invoke the
! 31: action. The _s_t_r_i_n_g may be a single command key, or a
! 32: sequence of up to 15 keys. The _a_c_t_i_o_n is the name of the
! 33: less action, from the list below. The characters in the
! 34: _s_t_r_i_n_g may appear literally, or be prefixed by a caret to
! 35: indicate a control key. A backslash followed by one to
! 36: three octal digits may be used to specify a character by its
! 37: octal value. A backslash followed by b, e, n, r or t speci-
! 38: fies BACKSPACE, ESCAPE, NEWLINE, RETURN or TAB, respec-
! 39: tively. A backslash followed by any other character indi-
! 40: cates that character is to be taken literally. Characters
! 41: which must be preceded by backslash include caret, space,
! 42: tab and the backslash itself. Blank lines and lines which
! 43: start with a pound sign (#) are ignored.
! 44:
! 45: An action may be followed by an "extra" string. When such a
! 46: command is entered while running _l_e_s_s, the action is per-
! 47: formed, and then the extra string is parsed, just as if it
! 48: were typed in to _l_e_s_s. This feature can be used in certain
! 49: cases to extend the functionality of a command. For exam-
! 50: ple, see the "{" and ":t" commands in the example below.
! 51:
! 52: The -V flag causes _l_e_s_s_k_e_y to print its version number and
! 53: immediately exit. Other flags and arguments are ignored.
! 54:
! 55:
! 56: EXAMPLE
! 57: The following input file describes the set of default com-
! 58: mand keys used by less:
! 59:
! 60:
! 61:
! 62:
! 63: 1
! 64:
! 65:
! 66:
! 67:
! 68:
! 69:
! 70: LESSKEY(1) USER COMMANDS LESSKEY(1)
! 71:
! 72:
! 73:
! 74: \r forw-line
! 75: \n forw-line
! 76: e forw-line
! 77: j forw-line
! 78: ^E forw-line
! 79: ^N forw-line
! 80: k back-line
! 81: y back-line
! 82: ^Y back-line
! 83: ^K back-line
! 84: ^P back-line
! 85: J forw-line-force
! 86: K back-line-force
! 87: Y back-line-force
! 88: d forw-scroll
! 89: ^D forw-scroll
! 90: u back-scroll
! 91: ^U back-scroll
! 92: \40 forw-screen
! 93: f forw-screen
! 94: ^F forw-screen
! 95: ^V forw-screen
! 96: b back-screen
! 97: ^B back-screen
! 98: \ev back-screen
! 99: z forw-window
! 100: w back-window
! 101: F forw-forever
! 102: R repaint-flush
! 103: r repaint
! 104: ^R repaint
! 105: ^L repaint
! 106: g goto-line
! 107: < goto-line
! 108: \e< goto-line
! 109: p percent
! 110: % percent
! 111: { forw-bracket {}
! 112: } back-bracket {}
! 113: ( forw-bracket ()
! 114: ) back-bracket ()
! 115: [ forw-bracket []
! 116: ] back-bracket []
! 117: \e^F forw-bracket
! 118: \e^B back-bracket
! 119: G goto-end
! 120: \e> goto-end
! 121: > goto-end
! 122: = status
! 123: ^G status
! 124: :f status
! 125: / forw-search
! 126:
! 127:
! 128:
! 129: 2
! 130:
! 131:
! 132:
! 133:
! 134:
! 135:
! 136: LESSKEY(1) USER COMMANDS LESSKEY(1)
! 137:
! 138:
! 139:
! 140: ? back-search
! 141: \e/ forw-search *
! 142: \e? back-search *
! 143: n repeat-search
! 144: \en repeat-search-all
! 145: N reverse-search
! 146: \eN reverse-search-all
! 147: \u undo-hilite
! 148: m set-mark
! 149: ' goto-mark
! 150: ^X^X goto-mark
! 151: E examine
! 152: :e examine
! 153: ^X^V examine
! 154: :n next-file
! 155: :p prev-file
! 156: :x index-file
! 157: - toggle-option
! 158: :t toggle-option t
! 159: s toggle-option o
! 160: _ display-option
! 161: | pipe
! 162: v visual
! 163: ! shell
! 164: + firstcmd
! 165: H help
! 166: h help
! 167: V version
! 168: q quit
! 169: :q quit
! 170: :Q quit
! 171: ZZ quit
! 172:
! 173:
! 174: PRECEDENCE
! 175: Commands specified by _l_e_s_s_k_e_y take precedence over the
! 176: default commands. A default command key may be disabled by
! 177: including it in the input file with the action "invalid".
! 178: Alternatively, a key may be defined to do nothing by using
! 179: the action "noaction". "noaction" is similar to "invalid",
! 180: but _l_e_s_s will give an error beep for an "invalid" command,
! 181: but not for a "noaction" command. In addition, ALL default
! 182: commands may be disabled by adding this control line to the
! 183: input file:
! 184:
! 185: #stop
! 186:
! 187: This will cause all default commands to be ignored. The
! 188: #stop line should be the last line in that section of the
! 189: file. (Another section, introduced by #line-edit, may fol-
! 190: low the #stop line.)
! 191:
! 192:
! 193:
! 194:
! 195: 3
! 196:
! 197:
! 198:
! 199:
! 200:
! 201:
! 202: LESSKEY(1) USER COMMANDS LESSKEY(1)
! 203:
! 204:
! 205:
! 206: Be aware that #stop can be dangerous. Since all default com-
! 207: mands are disabled, you must provide sufficient commands
! 208: before the #stop line to enable all necessary actions. For
! 209: example, failure to provide a "quit" command can lead to
! 210: frustration.
! 211:
! 212:
! 213: LINE EDITING
! 214: New key bindings may be specified for the line editing com-
! 215: mands, in a manner similar to the way key bindings for ordi-
! 216: nary commands are specified. This control line marks the
! 217: beginning of a section of line-editing commands:
! 218:
! 219: #line-edit
! 220:
! 221: Following this line is a list of keys and actions, one per
! 222: line as in the example below.
! 223:
! 224:
! 225: EXAMPLE
! 226: The following input file describes the set of default line-
! 227: editing keys used by less:
! 228:
! 229: #line-edit
! 230: \t forw-complete
! 231: \17 back-complete
! 232: \e\t back-complete
! 233: \14 expand
! 234: ^V literal
! 235: ^A literal
! 236: \el right
! 237: \eh left
! 238: \eb word-left
! 239: \ew word-right
! 240: \ei insert
! 241: \ex delete
! 242: \e\b word-backspace
! 243: \e0 home
! 244: \e$ end
! 245: \ek up
! 246: \ej down
! 247:
! 248:
! 249:
! 250: SEE ALSO
! 251: less(1)
! 252:
! 253:
! 254: COPYRIGHT
! 255: Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman
! 256:
! 257:
! 258:
! 259:
! 260:
! 261: 4
! 262:
! 263:
! 264: