1 .\" $NetBSD: editrc.5,v 1.20 2006/08/21 12:45:30 christos Exp $
3 .\" Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 .\" POSSIBILITY OF SUCH DAMAGE.
36 .Nd configuration file for editline library
42 file defines various settings to be used by the
46 The format of each line is:
47 .Dl [prog:]command [arg [...]]
58 is the program name string that a program defines when it calls
65 will be executed for any program which matches
72 regular expression, in which case
74 will be executed for any program that matches the regular expression.
80 is executed for all programs.
84 library has some builtin commands, which affect the way
85 that the line editing and history functions operate.
86 These are based on similar named builtins present in the
90 The following builtin commands are available:
100 .Op Ar key Op Ar command
102 Without options, list all bound keys, and the editor command to which
106 is supplied, show the bindings for
117 Bind all keys to the standard GNU Emacs-like bindings.
119 Bind all keys to the standard
123 List or change key bindings in the
125 mode alternate (command mode) key map.
128 is interpreted as a symbolic arrow key name, which may be one of
135 List all editor commands and a short description of each.
137 Remove a key's binding.
140 is taken as a literal string and treated as terminal input when
145 are themselves reinterpreted, and this continues for ten levels of
150 may be one of the commands documented in
151 .Sx "EDITOR COMMANDS"
152 below, or another key.
157 can contain control characters of the form
159 .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 Cm on | 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 will not 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
289 lists all tty modes in the chosen set regardless of the setting.
297 on or off or removes control of
302 can also be used to set tty characters to particular values using
307 then the character is set to
308 .Dv _POSIX_VDISABLE .
311 The following editor commands are available for use in key bindings:
312 .\" Section automatically generated with makelist
315 Vi paste previous deletion to the right of the cursor.
317 Vi paste previous deletion to the left of the cursor.
318 .It Ic vi-prev-space-word
319 Vi move to the previous space delimited word.
321 Vi move to the previous word.
322 .It Ic vi-next-space-word
323 Vi move to the next space delimited word.
325 Vi move to the next word.
326 .It Ic vi-change-case
327 Vi change case of character under the cursor and advance one character.
328 .It Ic vi-change-meta
329 Vi change prefix command.
330 .It Ic vi-insert-at-bol
331 Vi enter insert mode at the beginning of line.
332 .It Ic vi-replace-char
333 Vi replace character under the cursor with the next character typed.
334 .It Ic vi-replace-mode
335 Vi enter replace mode.
336 .It Ic vi-substitute-char
337 Vi replace character under the cursor and enter insert mode.
338 .It Ic vi-substitute-line
339 Vi substitute entire line.
340 .It Ic vi-change-to-eol
341 Vi change to end of line.
343 Vi enter insert mode.
345 Vi enter insert mode after the cursor.
347 Vi enter insert mode at end of line.
348 .It Ic vi-delete-meta
349 Vi delete prefix command.
351 Vi move to the end of the current space delimited word.
352 .It Ic vi-to-end-word
353 Vi move to the end of the current word.
356 .It Ic vi-command-mode
357 Vi enter command mode (use alternative key bindings).
359 Vi move to the beginning of line.
360 .It Ic vi-delete-prev-char
361 Vi move to previous character (backspace).
362 .It Ic vi-list-or-eof
363 Vi list choices for completion or indicate end of file if empty line.
364 .It Ic vi-kill-line-prev
365 Vi cut from beginning of line to cursor.
366 .It Ic vi-search-prev
367 Vi search history previous.
368 .It Ic vi-search-next
369 Vi search history next.
370 .It Ic vi-repeat-search-next
371 Vi repeat current search in the same search direction.
372 .It Ic vi-repeat-search-prev
373 Vi repeat current search in the opposite search direction.
375 Vi move to the character specified next.
377 Vi move to the character specified previous.
378 .It Ic vi-to-next-char
379 Vi move up to the character specified next.
380 .It Ic vi-to-prev-char
381 Vi move up to the character specified previous.
382 .It Ic vi-repeat-next-char
383 Vi repeat current character search in the same search direction.
384 .It Ic vi-repeat-prev-char
385 Vi repeat current character search in the opposite search direction.
386 .It Ic em-delete-or-list
387 Delete character under cursor or list completions if at end of line.
388 .It Ic em-delete-next-word
389 Cut from cursor to end of current word.
391 Paste cut buffer at cursor position.
393 Cut the entire line and save in cut buffer.
394 .It Ic em-kill-region
395 Cut area between mark and cursor and save in cut buffer.
396 .It Ic em-copy-region
397 Copy area between mark and cursor to cut buffer.
398 .It Ic em-gosmacs-transpose
399 Exchange the two characters before the cursor.
401 Move next to end of current word.
403 Uppercase the characters from cursor to end of current word.
404 .It Ic em-capitol-case
405 Capitalize the characters from cursor to end of current word.
407 Lowercase the characters from cursor to end of current word.
409 Set the mark at cursor.
410 .It Ic em-exchange-mark
411 Exchange the cursor and mark.
412 .It Ic em-universal-argument
413 Universal argument (argument times 4).
415 Add 8th bit to next character typed.
416 .It Ic em-toggle-overwrite
417 Switch from insert to overwrite mode or vice versa.
418 .It Ic em-copy-prev-word
419 Copy current word to cursor.
420 .It Ic em-inc-search-next
421 Emacs incremental next search.
422 .It Ic em-inc-search-prev
423 Emacs incremental reverse search.
424 .It Ic ed-end-of-file
425 Indicate end of file.
427 Add character to the line.
428 .It Ic ed-delete-prev-word
429 Delete from beginning of current word to cursor.
430 .It Ic ed-delete-next-char
431 Delete character under cursor.
433 Cut to the end of line.
434 .It Ic ed-move-to-end
435 Move cursor to the end of line.
436 .It Ic ed-move-to-beg
437 Move cursor to the beginning of line.
438 .It Ic ed-transpose-chars
439 Exchange the character to the left of the cursor with the one under it.
441 Move to the right one character.
443 Move to the beginning of the current word.
445 Move to the left one character.
446 .It Ic ed-quoted-insert
447 Add the next character typed verbatim.
449 Adds to argument or enters a digit.
450 .It Ic ed-argument-digit
451 Digit that starts argument.
453 Indicates unbound character.
455 Tty interrupt character.
457 Tty delayed suspend character.
458 .It Ic ed-tty-flush-output
459 Tty flush output characters.
460 .It Ic ed-tty-sigquit
462 .It Ic ed-tty-sigtstp
463 Tty suspend character.
464 .It Ic ed-tty-stop-output
465 Tty disallow output characters.
466 .It Ic ed-tty-start-output
467 Tty allow output characters.
470 .It Ic ed-delete-prev-char
471 Delete the character to the left of the cursor.
472 .It Ic ed-clear-screen
473 Clear screen leaving current line at the top.
475 Redisplay everything.
477 Erase current line and start from scratch.
478 .It Ic ed-sequence-lead-in
479 First character in a bound sequence.
480 .It Ic ed-prev-history
481 Move to the previous history line.
482 .It Ic ed-next-history
483 Move to the next history line.
484 .It Ic ed-search-prev-history
485 Search previous in history for a line matching the current.
486 .It Ic ed-search-next-history
487 Search next in history for a line matching the current.
493 Editline extended command.
495 .\" End of section automatically generated with makelist
504 library was written by
505 .An Christos Zoulas ,
506 and this manual was written by
508 with some sections inspired by