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.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\" must display the following acknowledgement:
16 .\" This product includes software developed by the NetBSD
17 .\" Foundation, Inc. and its contributors.
18 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
19 .\" contributors may be used to endorse or promote products derived
20 .\" from this software without specific prior written permission.
22 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
23 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
24 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
26 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 .\" POSSIBILITY OF SUCH DAMAGE.
34 .\" $NetBSD: editrc.5,v 1.19 2003/11/01 23:35:33 christos Exp $
35 .\" $DragonFly: src/lib/libedit/editrc.5,v 1.4 2006/03/27 16:45:43 swildner Exp $
42 .Nd configuration file for editline library
48 file defines various settings to be used by the
52 The format of each line is:
53 .Dl [prog:]command [arg [...]]
64 is the program name string that a program defines when it calls
71 will be executed for any program which matches
78 regular expression, in which case
80 will be executed for any program that matches the regular expression.
86 is executed for all programs.
90 library has some builtin commands, which affect the way
91 that the line editing and history functions operate.
92 These are based on similar named builtins present in the
96 The following builtin commands are available:
106 .Op Ar key Op Ar command
108 Without options, list all bound keys, and the editor command to which
112 is supplied, show the bindings for
123 Bind all keys to the standard GNU Emacs-like bindings.
125 Bind all keys to the standard
129 List or change key bindings in the
131 mode alternate (command mode) key map.
134 is interpreted as a symbolic arrow key name, which may be one of
141 List all editor commands and a short description of each.
143 Remove a key's binding.
146 is taken as a literal string and treated as terminal input when
151 are themselves reinterpreted, and this continues for ten levels of
156 may be one of the commands documented in
157 .Sx "EDITOR COMMANDS"
158 below, or another key.
163 can contain control characters of the form
165 .Sq No ^ Ar character
171 and the following backslashed escape sequences:
173 .Bl -tag -compact -offset indent -width 4n
193 The ASCII character corresponding to the octal number
198 nullifies the special meaning of the following character,
199 if it has any, notably
208 Exercise terminal capabilities given in
219 the value of that capability is printed, with
223 indicating that the terminal does or does not have that capability.
226 returns an empty string for non-existent capabilities, rather than
229 causes messages to be verbose.
230 .It Ic edit Op Li on | Li off
231 Enable or disable the
233 functionality in a program.
234 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
237 command lists all entries in the history.
240 command sets the history size to
245 command controls if history should keep duplicate entries.
248 is non zero, only keep unique history entries.
251 is zero, then keep all entries (the default).
253 List the values of all the terminal capabilities (see
255 .It Ic settc Ar cap Ar val
256 Set the terminal capability
262 No sanity checking is done.
273 Control which tty modes that
275 won't allow the user to change.
287 set of tty modes respectively; defaulting to
290 Without other arguments,
292 lists the modes in the chosen set which are fixed on
301 lists all tty modes in the chosen set regardless of the setting.
309 on or off or removes control of
314 can also be used to set tty characters to particular values using
319 then the character is set to
320 .Dv _POSIX_VDISABLE .
323 The following editor commands are available for use in key bindings:
324 .\" Section automatically generated with makelist
327 Vi paste previous deletion to the right of the cursor.
329 Vi paste previous deletion to the left of the cursor.
330 .It Ic vi-prev-space-word
331 Vi move to the previous space delimited word.
333 Vi move to the previous word.
334 .It Ic vi-next-space-word
335 Vi move to the next space delimited word.
337 Vi move to the next word.
338 .It Ic vi-change-case
339 Vi change case of character under the cursor and advance one character.
340 .It Ic vi-change-meta
341 Vi change prefix command.
342 .It Ic vi-insert-at-bol
343 Vi enter insert mode at the beginning of line.
344 .It Ic vi-replace-char
345 Vi replace character under the cursor with the next character typed.
346 .It Ic vi-replace-mode
347 Vi enter replace mode.
348 .It Ic vi-substitute-char
349 Vi replace character under the cursor and enter insert mode.
350 .It Ic vi-substitute-line
351 Vi substitute entire line.
352 .It Ic vi-change-to-eol
353 Vi change to end of line.
355 Vi enter insert mode.
357 Vi enter insert mode after the cursor.
359 Vi enter insert mode at end of line.
360 .It Ic vi-delete-meta
361 Vi delete prefix command.
363 Vi move to the end of the current space delimited word.
364 .It Ic vi-to-end-word
365 Vi move to the end of the current word.
368 .It Ic vi-command-mode
369 Vi enter command mode (use alternative key bindings).
371 Vi move to the beginning of line.
372 .It Ic vi-delete-prev-char
373 Vi move to previous character (backspace).
374 .It Ic vi-list-or-eof
375 Vi list choices for completion or indicate end of file if empty line.
376 .It Ic vi-kill-line-prev
377 Vi cut from beginning of line to cursor.
378 .It Ic vi-search-prev
379 Vi search history previous.
380 .It Ic vi-search-next
381 Vi search history next.
382 .It Ic vi-repeat-search-next
383 Vi repeat current search in the same search direction.
384 .It Ic vi-repeat-search-prev
385 Vi repeat current search in the opposite search direction.
387 Vi move to the character specified next.
389 Vi move to the character specified previous.
390 .It Ic vi-to-next-char
391 Vi move up to the character specified next.
392 .It Ic vi-to-prev-char
393 Vi move up to the character specified previous.
394 .It Ic vi-repeat-next-char
395 Vi repeat current character search in the same search direction.
396 .It Ic vi-repeat-prev-char
397 Vi repeat current character search in the opposite search direction.
398 .It Ic em-delete-or-list
399 Delete character under cursor or list completions if at end of line.
400 .It Ic em-delete-next-word
401 Cut from cursor to end of current word.
403 Paste cut buffer at cursor position.
405 Cut the entire line and save in cut buffer.
406 .It Ic em-kill-region
407 Cut area between mark and cursor and save in cut buffer.
408 .It Ic em-copy-region
409 Copy area between mark and cursor to cut buffer.
410 .It Ic em-gosmacs-transpose
411 Exchange the two characters before the cursor.
413 Move next to end of current word.
415 Uppercase the characters from cursor to end of current word.
416 .It Ic em-capitol-case
417 Capitalize the characters from cursor to end of current word.
419 Lowercase the characters from cursor to end of current word.
421 Set the mark at cursor.
422 .It Ic em-exchange-mark
423 Exchange the cursor and mark.
424 .It Ic em-universal-argument
425 Universal argument (argument times 4).
427 Add 8th bit to next character typed.
428 .It Ic em-toggle-overwrite
429 Switch from insert to overwrite mode or vice versa.
430 .It Ic em-copy-prev-word
431 Copy current word to cursor.
432 .It Ic em-inc-search-next
433 Emacs incremental next search.
434 .It Ic em-inc-search-prev
435 Emacs incremental reverse search.
436 .It Ic ed-end-of-file
437 Indicate end of file.
439 Add character to the line.
440 .It Ic ed-delete-prev-word
441 Delete from beginning of current word to cursor.
442 .It Ic ed-delete-next-char
443 Delete character under cursor.
445 Cut to the end of line.
446 .It Ic ed-move-to-end
447 Move cursor to the end of line.
448 .It Ic ed-move-to-beg
449 Move cursor to the beginning of line.
450 .It Ic ed-transpose-chars
451 Exchange the character to the left of the cursor with the one under it.
453 Move to the right one character.
455 Move to the beginning of the current word.
457 Move to the left one character.
458 .It Ic ed-quoted-insert
459 Add the next character typed verbatim.
461 Adds to argument or enters a digit.
462 .It Ic ed-argument-digit
463 Digit that starts argument.
465 Indicates unbound character.
467 Tty interrupt character.
469 Tty delayed suspend character.
470 .It Ic ed-tty-flush-output
471 Tty flush output characters.
472 .It Ic ed-tty-sigquit
474 .It Ic ed-tty-sigtstp
475 Tty suspend character.
476 .It Ic ed-tty-stop-output
477 Tty disallow output characters.
478 .It Ic ed-tty-start-output
479 Tty allow output characters.
482 .It Ic ed-delete-prev-char
483 Delete the character to the left of the cursor.
484 .It Ic ed-clear-screen
485 Clear screen leaving current line at the top.
487 Redisplay everything.
489 Erase current line and start from scratch.
490 .It Ic ed-sequence-lead-in
491 First character in a bound sequence.
492 .It Ic ed-prev-history
493 Move to the previous history line.
494 .It Ic ed-next-history
495 Move to the next history line.
496 .It Ic ed-search-prev-history
497 Search previous in history for a line matching the current.
498 .It Ic ed-search-next-history
499 Search next in history for a line matching the current.
505 Editline extended command.
507 .\" End of section automatically generated with makelist
515 library was written by Christos Zoulas,
516 and this manual was written by Luke Mewburn,
517 with some sections inspired by