1 .\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
2 .\" All rights reserved.
4 .\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
16 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
17 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
19 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 .\" POSSIBILITY OF SUCH DAMAGE.
27 .\" $NetBSD: editrc.5,v 1.21 2008/04/30 13:10:51 martin Exp $
28 .\" $DragonFly: src/lib/libedit/editrc.5,v 1.6 2008/05/17 22:48:04 pavalos Exp $
35 .Nd configuration file for editline library
41 file defines various settings to be used by the
45 The format of each line is:
46 .Dl [prog:]command [arg [...]]
57 is the program name string that a program defines when it calls
64 will be executed for any program which matches
71 regular expression, in which case
73 will be executed for any program that matches the regular expression.
79 is executed for all programs.
83 library has some builtin commands, which affect the way
84 that the line editing and history functions operate.
85 These are based on similar named builtins present in the
89 The following builtin commands are available:
99 .Op Ar key Op Ar command
101 Without options, list all bound keys, and the editor command to which
105 is supplied, show the bindings for
116 Bind all keys to the standard GNU Emacs-like bindings.
118 Bind all keys to the standard
122 List or change key bindings in the
124 mode alternate (command mode) key map.
127 is interpreted as a symbolic arrow key name, which may be one of
134 List all editor commands and a short description of each.
136 Remove a key's binding.
139 is taken as a literal string and treated as terminal input when
144 are themselves reinterpreted, and this continues for ten levels of
149 may be one of the commands documented in
150 .Sx "EDITOR COMMANDS"
151 below, or another key.
156 can contain control characters of the form
158 .Sq No ^ Ar character
164 and the following backslashed escape sequences:
166 .Bl -tag -compact -offset indent -width 4n
186 The ASCII character corresponding to the octal number
191 nullifies the special meaning of the following character,
192 if it has any, notably
201 Exercise terminal capabilities given in
212 the value of that capability is printed, with
216 indicating that the terminal does or does not have that capability.
219 returns an empty string for non-existent capabilities, rather than
222 causes messages to be verbose.
223 .It Ic edit Op Li on | Li off
224 Enable or disable the
226 functionality in a program.
227 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
230 command lists all entries in the history.
233 command sets the history size to
238 command controls if history should keep duplicate entries.
241 is non zero, only keep unique history entries.
244 is zero, then keep all entries (the default).
246 List the values of all the terminal capabilities (see
248 .It Ic settc Ar cap Ar val
249 Set the terminal capability
255 No sanity checking is done.
266 Control which tty modes that
268 won't allow the user to change.
280 set of tty modes respectively; defaulting to
283 Without other arguments,
285 lists the modes in the chosen set which are fixed on
294 lists all tty modes in the chosen set regardless of the setting.
302 on or off or removes control of
307 can also be used to set tty characters to particular values using
312 then the character is set to
313 .Dv _POSIX_VDISABLE .
316 The following editor commands are available for use in key bindings:
317 .\" Section automatically generated with makelist
320 Vi paste previous deletion to the right of the cursor.
322 Vi paste previous deletion to the left of the cursor.
323 .It Ic vi-prev-space-word
324 Vi move to the previous space delimited word.
326 Vi move to the previous word.
327 .It Ic vi-next-space-word
328 Vi move to the next space delimited word.
330 Vi move to the next word.
331 .It Ic vi-change-case
332 Vi change case of character under the cursor and advance one character.
333 .It Ic vi-change-meta
334 Vi change prefix command.
335 .It Ic vi-insert-at-bol
336 Vi enter insert mode at the beginning of line.
337 .It Ic vi-replace-char
338 Vi replace character under the cursor with the next character typed.
339 .It Ic vi-replace-mode
340 Vi enter replace mode.
341 .It Ic vi-substitute-char
342 Vi replace character under the cursor and enter insert mode.
343 .It Ic vi-substitute-line
344 Vi substitute entire line.
345 .It Ic vi-change-to-eol
346 Vi change to end of line.
348 Vi enter insert mode.
350 Vi enter insert mode after the cursor.
352 Vi enter insert mode at end of line.
353 .It Ic vi-delete-meta
354 Vi delete prefix command.
356 Vi move to the end of the current space delimited word.
357 .It Ic vi-to-end-word
358 Vi move to the end of the current word.
361 .It Ic vi-command-mode
362 Vi enter command mode (use alternative key bindings).
364 Vi move to the beginning of line.
365 .It Ic vi-delete-prev-char
366 Vi move to previous character (backspace).
367 .It Ic vi-list-or-eof
368 Vi list choices for completion or indicate end of file if empty line.
369 .It Ic vi-kill-line-prev
370 Vi cut from beginning of line to cursor.
371 .It Ic vi-search-prev
372 Vi search history previous.
373 .It Ic vi-search-next
374 Vi search history next.
375 .It Ic vi-repeat-search-next
376 Vi repeat current search in the same search direction.
377 .It Ic vi-repeat-search-prev
378 Vi repeat current search in the opposite search direction.
380 Vi move to the character specified next.
382 Vi move to the character specified previous.
383 .It Ic vi-to-next-char
384 Vi move up to the character specified next.
385 .It Ic vi-to-prev-char
386 Vi move up to the character specified previous.
387 .It Ic vi-repeat-next-char
388 Vi repeat current character search in the same search direction.
389 .It Ic vi-repeat-prev-char
390 Vi repeat current character search in the opposite search direction.
391 .It Ic em-delete-or-list
392 Delete character under cursor or list completions if at end of line.
393 .It Ic em-delete-next-word
394 Cut from cursor to end of current word.
396 Paste cut buffer at cursor position.
398 Cut the entire line and save in cut buffer.
399 .It Ic em-kill-region
400 Cut area between mark and cursor and save in cut buffer.
401 .It Ic em-copy-region
402 Copy area between mark and cursor to cut buffer.
403 .It Ic em-gosmacs-transpose
404 Exchange the two characters before the cursor.
406 Move next to end of current word.
408 Uppercase the characters from cursor to end of current word.
409 .It Ic em-capitol-case
410 Capitalize the characters from cursor to end of current word.
412 Lowercase the characters from cursor to end of current word.
414 Set the mark at cursor.
415 .It Ic em-exchange-mark
416 Exchange the cursor and mark.
417 .It Ic em-universal-argument
418 Universal argument (argument times 4).
420 Add 8th bit to next character typed.
421 .It Ic em-toggle-overwrite
422 Switch from insert to overwrite mode or vice versa.
423 .It Ic em-copy-prev-word
424 Copy current word to cursor.
425 .It Ic em-inc-search-next
426 Emacs incremental next search.
427 .It Ic em-inc-search-prev
428 Emacs incremental reverse search.
429 .It Ic ed-end-of-file
430 Indicate end of file.
432 Add character to the line.
433 .It Ic ed-delete-prev-word
434 Delete from beginning of current word to cursor.
435 .It Ic ed-delete-next-char
436 Delete character under cursor.
438 Cut to the end of line.
439 .It Ic ed-move-to-end
440 Move cursor to the end of line.
441 .It Ic ed-move-to-beg
442 Move cursor to the beginning of line.
443 .It Ic ed-transpose-chars
444 Exchange the character to the left of the cursor with the one under it.
446 Move to the right one character.
448 Move to the beginning of the current word.
450 Move to the left one character.
451 .It Ic ed-quoted-insert
452 Add the next character typed verbatim.
454 Adds to argument or enters a digit.
455 .It Ic ed-argument-digit
456 Digit that starts argument.
458 Indicates unbound character.
460 Tty interrupt character.
462 Tty delayed suspend character.
463 .It Ic ed-tty-flush-output
464 Tty flush output characters.
465 .It Ic ed-tty-sigquit
467 .It Ic ed-tty-sigtstp
468 Tty suspend character.
469 .It Ic ed-tty-stop-output
470 Tty disallow output characters.
471 .It Ic ed-tty-start-output
472 Tty allow output characters.
475 .It Ic ed-delete-prev-char
476 Delete the character to the left of the cursor.
477 .It Ic ed-clear-screen
478 Clear screen leaving current line at the top.
480 Redisplay everything.
482 Erase current line and start from scratch.
483 .It Ic ed-sequence-lead-in
484 First character in a bound sequence.
485 .It Ic ed-prev-history
486 Move to the previous history line.
487 .It Ic ed-next-history
488 Move to the next history line.
489 .It Ic ed-search-prev-history
490 Search previous in history for a line matching the current.
491 .It Ic ed-search-next-history
492 Search next in history for a line matching the current.
498 Editline extended command.
500 .\" End of section automatically generated with makelist
508 library was written by Christos Zoulas,
509 and this manual was written by Luke Mewburn,
510 with some sections inspired by