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. Neither the name of The NetBSD Foundation nor the names of its
15 .\" contributors may be used to endorse or promote products derived
16 .\" from this software without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
30 .\" $NetBSD: editrc.5,v 1.20 2006/08/21 12:45:30 christos Exp $
31 .\" $DragonFly: src/lib/libedit/editrc.5,v 1.5 2007/05/05 00:27:39 pavalos Exp $
38 .Nd configuration file for editline library
44 file defines various settings to be used by the
48 The format of each line is:
49 .Dl [prog:]command [arg [...]]
60 is the program name string that a program defines when it calls
67 will be executed for any program which matches
74 regular expression, in which case
76 will be executed for any program that matches the regular expression.
82 is executed for all programs.
86 library has some builtin commands, which affect the way
87 that the line editing and history functions operate.
88 These are based on similar named builtins present in the
92 The following builtin commands are available:
102 .Op Ar key Op Ar command
104 Without options, list all bound keys, and the editor command to which
108 is supplied, show the bindings for
119 Bind all keys to the standard GNU Emacs-like bindings.
121 Bind all keys to the standard
125 List or change key bindings in the
127 mode alternate (command mode) key map.
130 is interpreted as a symbolic arrow key name, which may be one of
137 List all editor commands and a short description of each.
139 Remove a key's binding.
142 is taken as a literal string and treated as terminal input when
147 are themselves reinterpreted, and this continues for ten levels of
152 may be one of the commands documented in
153 .Sx "EDITOR COMMANDS"
154 below, or another key.
159 can contain control characters of the form
161 .Sq No ^ Ar character
167 and the following backslashed escape sequences:
169 .Bl -tag -compact -offset indent -width 4n
189 The ASCII character corresponding to the octal number
194 nullifies the special meaning of the following character,
195 if it has any, notably
204 Exercise terminal capabilities given in
215 the value of that capability is printed, with
219 indicating that the terminal does or does not have that capability.
222 returns an empty string for non-existent capabilities, rather than
225 causes messages to be verbose.
226 .It Ic edit Op Li on | Li off
227 Enable or disable the
229 functionality in a program.
230 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
233 command lists all entries in the history.
236 command sets the history size to
241 command controls if history should keep duplicate entries.
244 is non zero, only keep unique history entries.
247 is zero, then keep all entries (the default).
249 List the values of all the terminal capabilities (see
251 .It Ic settc Ar cap Ar val
252 Set the terminal capability
258 No sanity checking is done.
269 Control which tty modes that
271 won't allow the user to change.
283 set of tty modes respectively; defaulting to
286 Without other arguments,
288 lists the modes in the chosen set which are fixed on
297 lists all tty modes in the chosen set regardless of the setting.
305 on or off or removes control of
310 can also be used to set tty characters to particular values using
315 then the character is set to
316 .Dv _POSIX_VDISABLE .
319 The following editor commands are available for use in key bindings:
320 .\" Section automatically generated with makelist
323 Vi paste previous deletion to the right of the cursor.
325 Vi paste previous deletion to the left of the cursor.
326 .It Ic vi-prev-space-word
327 Vi move to the previous space delimited word.
329 Vi move to the previous word.
330 .It Ic vi-next-space-word
331 Vi move to the next space delimited word.
333 Vi move to the next word.
334 .It Ic vi-change-case
335 Vi change case of character under the cursor and advance one character.
336 .It Ic vi-change-meta
337 Vi change prefix command.
338 .It Ic vi-insert-at-bol
339 Vi enter insert mode at the beginning of line.
340 .It Ic vi-replace-char
341 Vi replace character under the cursor with the next character typed.
342 .It Ic vi-replace-mode
343 Vi enter replace mode.
344 .It Ic vi-substitute-char
345 Vi replace character under the cursor and enter insert mode.
346 .It Ic vi-substitute-line
347 Vi substitute entire line.
348 .It Ic vi-change-to-eol
349 Vi change to end of line.
351 Vi enter insert mode.
353 Vi enter insert mode after the cursor.
355 Vi enter insert mode at end of line.
356 .It Ic vi-delete-meta
357 Vi delete prefix command.
359 Vi move to the end of the current space delimited word.
360 .It Ic vi-to-end-word
361 Vi move to the end of the current word.
364 .It Ic vi-command-mode
365 Vi enter command mode (use alternative key bindings).
367 Vi move to the beginning of line.
368 .It Ic vi-delete-prev-char
369 Vi move to previous character (backspace).
370 .It Ic vi-list-or-eof
371 Vi list choices for completion or indicate end of file if empty line.
372 .It Ic vi-kill-line-prev
373 Vi cut from beginning of line to cursor.
374 .It Ic vi-search-prev
375 Vi search history previous.
376 .It Ic vi-search-next
377 Vi search history next.
378 .It Ic vi-repeat-search-next
379 Vi repeat current search in the same search direction.
380 .It Ic vi-repeat-search-prev
381 Vi repeat current search in the opposite search direction.
383 Vi move to the character specified next.
385 Vi move to the character specified previous.
386 .It Ic vi-to-next-char
387 Vi move up to the character specified next.
388 .It Ic vi-to-prev-char
389 Vi move up to the character specified previous.
390 .It Ic vi-repeat-next-char
391 Vi repeat current character search in the same search direction.
392 .It Ic vi-repeat-prev-char
393 Vi repeat current character search in the opposite search direction.
394 .It Ic em-delete-or-list
395 Delete character under cursor or list completions if at end of line.
396 .It Ic em-delete-next-word
397 Cut from cursor to end of current word.
399 Paste cut buffer at cursor position.
401 Cut the entire line and save in cut buffer.
402 .It Ic em-kill-region
403 Cut area between mark and cursor and save in cut buffer.
404 .It Ic em-copy-region
405 Copy area between mark and cursor to cut buffer.
406 .It Ic em-gosmacs-transpose
407 Exchange the two characters before the cursor.
409 Move next to end of current word.
411 Uppercase the characters from cursor to end of current word.
412 .It Ic em-capitol-case
413 Capitalize the characters from cursor to end of current word.
415 Lowercase the characters from cursor to end of current word.
417 Set the mark at cursor.
418 .It Ic em-exchange-mark
419 Exchange the cursor and mark.
420 .It Ic em-universal-argument
421 Universal argument (argument times 4).
423 Add 8th bit to next character typed.
424 .It Ic em-toggle-overwrite
425 Switch from insert to overwrite mode or vice versa.
426 .It Ic em-copy-prev-word
427 Copy current word to cursor.
428 .It Ic em-inc-search-next
429 Emacs incremental next search.
430 .It Ic em-inc-search-prev
431 Emacs incremental reverse search.
432 .It Ic ed-end-of-file
433 Indicate end of file.
435 Add character to the line.
436 .It Ic ed-delete-prev-word
437 Delete from beginning of current word to cursor.
438 .It Ic ed-delete-next-char
439 Delete character under cursor.
441 Cut to the end of line.
442 .It Ic ed-move-to-end
443 Move cursor to the end of line.
444 .It Ic ed-move-to-beg
445 Move cursor to the beginning of line.
446 .It Ic ed-transpose-chars
447 Exchange the character to the left of the cursor with the one under it.
449 Move to the right one character.
451 Move to the beginning of the current word.
453 Move to the left one character.
454 .It Ic ed-quoted-insert
455 Add the next character typed verbatim.
457 Adds to argument or enters a digit.
458 .It Ic ed-argument-digit
459 Digit that starts argument.
461 Indicates unbound character.
463 Tty interrupt character.
465 Tty delayed suspend character.
466 .It Ic ed-tty-flush-output
467 Tty flush output characters.
468 .It Ic ed-tty-sigquit
470 .It Ic ed-tty-sigtstp
471 Tty suspend character.
472 .It Ic ed-tty-stop-output
473 Tty disallow output characters.
474 .It Ic ed-tty-start-output
475 Tty allow output characters.
478 .It Ic ed-delete-prev-char
479 Delete the character to the left of the cursor.
480 .It Ic ed-clear-screen
481 Clear screen leaving current line at the top.
483 Redisplay everything.
485 Erase current line and start from scratch.
486 .It Ic ed-sequence-lead-in
487 First character in a bound sequence.
488 .It Ic ed-prev-history
489 Move to the previous history line.
490 .It Ic ed-next-history
491 Move to the next history line.
492 .It Ic ed-search-prev-history
493 Search previous in history for a line matching the current.
494 .It Ic ed-search-next-history
495 Search next in history for a line matching the current.
501 Editline extended command.
503 .\" End of section automatically generated with makelist
511 library was written by Christos Zoulas,
512 and this manual was written by Luke Mewburn,
513 with some sections inspired by