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 $
34 .Nd configuration file for editline library
40 file defines various settings to be used by the
44 The format of each line is:
45 .Dl [prog:]command [arg [...]]
56 is the program name string that a program defines when it calls
63 will be executed for any program which matches
70 regular expression, in which case
72 will be executed for any program that matches the regular expression.
78 is executed for all programs.
82 library has some builtin commands, which affect the way
83 that the line editing and history functions operate.
84 These are based on similar named builtins present in the
88 The following builtin commands are available:
98 .Op Ar key Op Ar command
100 Without options, list all bound keys, and the editor command to which
104 is supplied, show the bindings for
115 Bind all keys to the standard GNU Emacs-like bindings.
117 Bind all keys to the standard
121 List or change key bindings in the
123 mode alternate (command mode) key map.
126 is interpreted as a symbolic arrow key name, which may be one of
133 List all editor commands and a short description of each.
135 Remove a key's binding.
138 is taken as a literal string and treated as terminal input when
143 are themselves reinterpreted, and this continues for ten levels of
148 may be one of the commands documented in
149 .Sx "EDITOR COMMANDS"
150 below, or another key.
155 can contain control characters of the form
157 .Sq No ^ Ar character
163 and the following backslashed escape sequences:
165 .Bl -tag -compact -offset indent -width 4n
185 The ASCII character corresponding to the octal number
190 nullifies the special meaning of the following character,
191 if it has any, notably
200 Exercise terminal capabilities given in
211 the value of that capability is printed, with
215 indicating that the terminal does or does not have that capability.
218 returns an empty string for non-existent capabilities, rather than
221 causes messages to be verbose.
222 .It Ic edit Op Li on | Li off
223 Enable or disable the
225 functionality in a program.
226 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
229 command lists all entries in the history.
232 command sets the history size to
237 command controls if history should keep duplicate entries.
240 is non zero, only keep unique history entries.
243 is zero, then keep all entries (the default).
245 List the values of all the terminal capabilities (see
247 .It Ic settc Ar cap Ar val
248 Set the terminal capability
254 No sanity checking is done.
265 Control which tty modes that
267 won't allow the user to change.
279 set of tty modes respectively; defaulting to
282 Without other arguments,
284 lists the modes in the chosen set which are fixed on
293 lists all tty modes in the chosen set regardless of the setting.
301 on or off or removes control of
306 can also be used to set tty characters to particular values using
311 then the character is set to
312 .Dv _POSIX_VDISABLE .
315 The following editor commands are available for use in key bindings:
316 .\" Section automatically generated with makelist
319 Vi paste previous deletion to the right of the cursor.
321 Vi paste previous deletion to the left of the cursor.
322 .It Ic vi-prev-space-word
323 Vi move to the previous space delimited word.
325 Vi move to the previous word.
326 .It Ic vi-next-space-word
327 Vi move to the next space delimited word.
329 Vi move to the next word.
330 .It Ic vi-change-case
331 Vi change case of character under the cursor and advance one character.
332 .It Ic vi-change-meta
333 Vi change prefix command.
334 .It Ic vi-insert-at-bol
335 Vi enter insert mode at the beginning of line.
336 .It Ic vi-replace-char
337 Vi replace character under the cursor with the next character typed.
338 .It Ic vi-replace-mode
339 Vi enter replace mode.
340 .It Ic vi-substitute-char
341 Vi replace character under the cursor and enter insert mode.
342 .It Ic vi-substitute-line
343 Vi substitute entire line.
344 .It Ic vi-change-to-eol
345 Vi change to end of line.
347 Vi enter insert mode.
349 Vi enter insert mode after the cursor.
351 Vi enter insert mode at end of line.
352 .It Ic vi-delete-meta
353 Vi delete prefix command.
355 Vi move to the end of the current space delimited word.
356 .It Ic vi-to-end-word
357 Vi move to the end of the current word.
360 .It Ic vi-command-mode
361 Vi enter command mode (use alternative key bindings).
363 Vi move to the beginning of line.
364 .It Ic vi-delete-prev-char
365 Vi move to previous character (backspace).
366 .It Ic vi-list-or-eof
367 Vi list choices for completion or indicate end of file if empty line.
368 .It Ic vi-kill-line-prev
369 Vi cut from beginning of line to cursor.
370 .It Ic vi-search-prev
371 Vi search history previous.
372 .It Ic vi-search-next
373 Vi search history next.
374 .It Ic vi-repeat-search-next
375 Vi repeat current search in the same search direction.
376 .It Ic vi-repeat-search-prev
377 Vi repeat current search in the opposite search direction.
379 Vi move to the character specified next.
381 Vi move to the character specified previous.
382 .It Ic vi-to-next-char
383 Vi move up to the character specified next.
384 .It Ic vi-to-prev-char
385 Vi move up to the character specified previous.
386 .It Ic vi-repeat-next-char
387 Vi repeat current character search in the same search direction.
388 .It Ic vi-repeat-prev-char
389 Vi repeat current character search in the opposite search direction.
390 .It Ic em-delete-or-list
391 Delete character under cursor or list completions if at end of line.
392 .It Ic em-delete-next-word
393 Cut from cursor to end of current word.
395 Paste cut buffer at cursor position.
397 Cut the entire line and save in cut buffer.
398 .It Ic em-kill-region
399 Cut area between mark and cursor and save in cut buffer.
400 .It Ic em-copy-region
401 Copy area between mark and cursor to cut buffer.
402 .It Ic em-gosmacs-transpose
403 Exchange the two characters before the cursor.
405 Move next to end of current word.
407 Uppercase the characters from cursor to end of current word.
408 .It Ic em-capitol-case
409 Capitalize the characters from cursor to end of current word.
411 Lowercase the characters from cursor to end of current word.
413 Set the mark at cursor.
414 .It Ic em-exchange-mark
415 Exchange the cursor and mark.
416 .It Ic em-universal-argument
417 Universal argument (argument times 4).
419 Add 8th bit to next character typed.
420 .It Ic em-toggle-overwrite
421 Switch from insert to overwrite mode or vice versa.
422 .It Ic em-copy-prev-word
423 Copy current word to cursor.
424 .It Ic em-inc-search-next
425 Emacs incremental next search.
426 .It Ic em-inc-search-prev
427 Emacs incremental reverse search.
428 .It Ic ed-end-of-file
429 Indicate end of file.
431 Add character to the line.
432 .It Ic ed-delete-prev-word
433 Delete from beginning of current word to cursor.
434 .It Ic ed-delete-next-char
435 Delete character under cursor.
437 Cut to the end of line.
438 .It Ic ed-move-to-end
439 Move cursor to the end of line.
440 .It Ic ed-move-to-beg
441 Move cursor to the beginning of line.
442 .It Ic ed-transpose-chars
443 Exchange the character to the left of the cursor with the one under it.
445 Move to the right one character.
447 Move to the beginning of the current word.
449 Move to the left one character.
450 .It Ic ed-quoted-insert
451 Add the next character typed verbatim.
453 Adds to argument or enters a digit.
454 .It Ic ed-argument-digit
455 Digit that starts argument.
457 Indicates unbound character.
459 Tty interrupt character.
461 Tty delayed suspend character.
462 .It Ic ed-tty-flush-output
463 Tty flush output characters.
464 .It Ic ed-tty-sigquit
466 .It Ic ed-tty-sigtstp
467 Tty suspend character.
468 .It Ic ed-tty-stop-output
469 Tty disallow output characters.
470 .It Ic ed-tty-start-output
471 Tty allow output characters.
474 .It Ic ed-delete-prev-char
475 Delete the character to the left of the cursor.
476 .It Ic ed-clear-screen
477 Clear screen leaving current line at the top.
479 Redisplay everything.
481 Erase current line and start from scratch.
482 .It Ic ed-sequence-lead-in
483 First character in a bound sequence.
484 .It Ic ed-prev-history
485 Move to the previous history line.
486 .It Ic ed-next-history
487 Move to the next history line.
488 .It Ic ed-search-prev-history
489 Search previous in history for a line matching the current.
490 .It Ic ed-search-next-history
491 Search next in history for a line matching the current.
497 Editline extended command.
499 .\" End of section automatically generated with makelist
507 library was written by Christos Zoulas,
508 and this manual was written by Luke Mewburn,
509 with some sections inspired by