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.
16 .\" 3. Neither the name of The NetBSD Foundation nor the names of its
17 .\" contributors may be used to endorse or promote products derived
18 .\" from this software without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 .\" POSSIBILITY OF SUCH DAMAGE.
39 .Nd configuration file for editline library
45 file defines various settings to be used by the
49 The format of each line is:
50 .Dl [prog:]command [arg [...]]
61 is the program name string that a program defines when it calls
68 will be executed for any program which matches
75 regular expression, in which case
77 will be executed for any program that matches the regular expression.
83 is executed for all programs.
87 library has some builtin commands, which affect the way
88 that the line editing and history functions operate.
89 These are based on similar named builtins present in the
93 The following builtin commands are available:
103 .Op Ar key Op Ar command
105 Without options, list all bound keys, and the editor command to which
109 is supplied, show the bindings for
120 Bind all keys to the standard GNU Emacs-like bindings.
122 Bind all keys to the standard
126 List or change key bindings in the
128 mode alternate (command mode) key map.
131 is interpreted as a symbolic arrow key name, which may be one of
138 List all editor commands and a short description of each.
140 Remove a key's binding.
143 is taken as a literal string and treated as terminal input when
148 are themselves reinterpreted, and this continues for ten levels of
153 may be one of the commands documented in
154 .Sx "EDITOR COMMANDS"
155 below, or another key.
160 can contain control characters of the form
162 .Sq No ^ Ar character
166 and the following backslashed escape sequences:
168 .Bl -tag -compact -offset indent -width 4n
188 The ASCII character corresponding to the octal number
193 nullifies the special meaning of the following character,
194 if it has any, notably
203 Exercise terminal capabilities given in
214 the value of that capability is printed, with
218 indicating that the terminal does or does not have that capability.
221 returns an empty string for non-existent capabilities, rather than
224 causes messages to be verbose.
225 .It Ic edit Op Cm on | off
226 Enable or disable the
228 functionality in a program.
229 .It Ic history Ar list | Ar size Dv n | Ar unique Dv n
232 command lists all entries in the history.
235 command sets the history size to
240 command controls if history should keep duplicate entries.
243 is non zero, only keep unique history entries.
246 is zero, then keep all entries (the default).
248 List the values of all the terminal capabilities (see
250 .It Ic settc Ar cap Ar val
251 Set the terminal capability
257 No sanity checking is done.
268 Control which tty modes that
270 will not allow the user to change.
282 set of tty modes respectively; defaulting to
285 Without other arguments,
287 lists the modes in the chosen set which are fixed on
292 lists all tty modes in the chosen set regardless of the setting.
300 on or off or removes control of
305 can also be used to set tty characters to particular values using
310 then the character is set to
311 .Dv _POSIX_VDISABLE .
314 The following editor commands are available for use in key bindings:
315 .\" Section automatically generated with makelist
318 Vi paste previous deletion to the right of the cursor.
320 Vi paste previous deletion to the left of the cursor.
321 .It Ic vi-prev-space-word
322 Vi move to the previous space delimited word.
324 Vi move to the previous word.
325 .It Ic vi-next-space-word
326 Vi move to the next space delimited word.
328 Vi move to the next word.
329 .It Ic vi-change-case
330 Vi change case of character under the cursor and advance one character.
331 .It Ic vi-change-meta
332 Vi change prefix command.
333 .It Ic vi-insert-at-bol
334 Vi enter insert mode at the beginning of line.
335 .It Ic vi-replace-char
336 Vi replace character under the cursor with the next character typed.
337 .It Ic vi-replace-mode
338 Vi enter replace mode.
339 .It Ic vi-substitute-char
340 Vi replace character under the cursor and enter insert mode.
341 .It Ic vi-substitute-line
342 Vi substitute entire line.
343 .It Ic vi-change-to-eol
344 Vi change to end of line.
346 Vi enter insert mode.
348 Vi enter insert mode after the cursor.
350 Vi enter insert mode at end of line.
351 .It Ic vi-delete-meta
352 Vi delete prefix command.
354 Vi move to the end of the current space delimited word.
355 .It Ic vi-to-end-word
356 Vi move to the end of the current word.
359 .It Ic vi-command-mode
360 Vi enter command mode (use alternative key bindings).
362 Vi move to the beginning of line.
363 .It Ic vi-delete-prev-char
364 Vi move to previous character (backspace).
365 .It Ic vi-list-or-eof
366 Vi list choices for completion or indicate end of file if empty line.
367 .It Ic vi-kill-line-prev
368 Vi cut from beginning of line to cursor.
369 .It Ic vi-search-prev
370 Vi search history previous.
371 .It Ic vi-search-next
372 Vi search history next.
373 .It Ic vi-repeat-search-next
374 Vi repeat current search in the same search direction.
375 .It Ic vi-repeat-search-prev
376 Vi repeat current search in the opposite search direction.
378 Vi move to the character specified next.
380 Vi move to the character specified previous.
381 .It Ic vi-to-next-char
382 Vi move up to the character specified next.
383 .It Ic vi-to-prev-char
384 Vi move up to the character specified previous.
385 .It Ic vi-repeat-next-char
386 Vi repeat current character search in the same search direction.
387 .It Ic vi-repeat-prev-char
388 Vi repeat current character search in the opposite search direction.
389 .It Ic em-delete-or-list
390 Delete character under cursor or list completions if at end of line.
391 .It Ic em-delete-next-word
392 Cut from cursor to end of current word.
394 Paste cut buffer at cursor position.
396 Cut the entire line and save in cut buffer.
397 .It Ic em-kill-region
398 Cut area between mark and cursor and save in cut buffer.
399 .It Ic em-copy-region
400 Copy area between mark and cursor to cut buffer.
401 .It Ic em-gosmacs-transpose
402 Exchange the two characters before the cursor.
404 Move next to end of current word.
406 Uppercase the characters from cursor to end of current word.
407 .It Ic em-capitol-case
408 Capitalize the characters from cursor to end of current word.
410 Lowercase the characters from cursor to end of current word.
412 Set the mark at cursor.
413 .It Ic em-exchange-mark
414 Exchange the cursor and mark.
415 .It Ic em-universal-argument
416 Universal argument (argument times 4).
418 Add 8th bit to next character typed.
419 .It Ic em-toggle-overwrite
420 Switch from insert to overwrite mode or vice versa.
421 .It Ic em-copy-prev-word
422 Copy current word to cursor.
423 .It Ic em-inc-search-next
424 Emacs incremental next search.
425 .It Ic em-inc-search-prev
426 Emacs incremental reverse search.
427 .It Ic ed-end-of-file
428 Indicate end of file.
430 Add character to the line.
431 .It Ic ed-delete-prev-word
432 Delete from beginning of current word to cursor.
433 .It Ic ed-delete-next-char
434 Delete character under cursor.
436 Cut to the end of line.
437 .It Ic ed-move-to-end
438 Move cursor to the end of line.
439 .It Ic ed-move-to-beg
440 Move cursor to the beginning of line.
441 .It Ic ed-transpose-chars
442 Exchange the character to the left of the cursor with the one under it.
444 Move to the right one character.
446 Move to the beginning of the current word.
448 Move to the left one character.
449 .It Ic ed-quoted-insert
450 Add the next character typed verbatim.
452 Adds to argument or enters a digit.
453 .It Ic ed-argument-digit
454 Digit that starts argument.
456 Indicates unbound character.
458 Tty interrupt character.
460 Tty delayed suspend character.
461 .It Ic ed-tty-flush-output
462 Tty flush output characters.
463 .It Ic ed-tty-sigquit
465 .It Ic ed-tty-sigtstp
466 Tty suspend character.
467 .It Ic ed-tty-stop-output
468 Tty disallow output characters.
469 .It Ic ed-tty-start-output
470 Tty allow output characters.
473 .It Ic ed-delete-prev-char
474 Delete the character to the left of the cursor.
475 .It Ic ed-clear-screen
476 Clear screen leaving current line at the top.
478 Redisplay everything.
480 Erase current line and start from scratch.
481 .It Ic ed-sequence-lead-in
482 First character in a bound sequence.
483 .It Ic ed-prev-history
484 Move to the previous history line.
485 .It Ic ed-next-history
486 Move to the next history line.
487 .It Ic ed-search-prev-history
488 Search previous in history for a line matching the current.
489 .It Ic ed-search-next-history
490 Search next in history for a line matching the current.
496 Editline extended command.
498 .\" End of section automatically generated with makelist
507 library was written by
508 .An Christos Zoulas ,
509 and this manual was written by
511 with some sections inspired by