1 .\" $NetBSD: editrc.5,v 1.10 2000/11/08 00:09:38 lukem 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. All advertising materials mentioning features or use of this software
17 .\" must display the following acknowledgement:
18 .\" This product includes software developed by the NetBSD
19 .\" Foundation, Inc. and its contributors.
20 .\" 4. Neither the name of The NetBSD Foundation nor the names of its
21 .\" contributors may be used to endorse or promote products derived
22 .\" from this software without specific prior written permission.
24 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
25 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
28 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 .\" POSSIBILITY OF SUCH DAMAGE.
43 .Nd configuration file for editline library
49 file defines various settings to be used by the
53 The format of each line is:
54 .Dl [prog:]command [arg [...]]
65 is the program name string that a program defines when it calls
72 will be executed for any program which matches
79 regular expression, in which case
81 will be executed for any program that matches the regular expression.
87 is executed for all programs.
91 library has some builtin commands, which affect the way
92 that the line editing and history functions operate.
93 These are based on similar named builtins present in the
97 The following builtin commands are available:
107 .Op Ar key Op Ar command
109 Without options, list all bound keys, and the editor command to which
113 is supplied, show the bindings for
124 Bind all keys to the standard GNU Emacs-like bindings.
126 Bind all keys to the standard
130 List or change key bindings in the
132 mode alternate (command mode) key map.
135 is interpreted as a symbolic arrow key name, which may be one of
142 List all editor commands and a short description of each.
144 Remove a key's binding.
147 is taken as a literal string and treated as terminal input when
152 are themselves reinterpreted, and this continues for ten levels of
157 may be one of the commands documented in
158 .Sx "EDITOR COMMANDS"
159 below, or another key.
164 can contain control characters of the form
166 .Sq No ^ Ar character
170 and the following backslashed escape sequences:
172 .Bl -tag -compact -offset indent -width 4n
192 The ASCII character corresponding to the octal number
197 nullifies the special meaning of the following character,
198 if it has any, notably
207 Exercise terminal capabilities given in
218 the value of that capability is printed, with
222 indicating that the terminal does or does not have that capability.
225 returns an empty string for non-existent capabilities, rather than
228 causes messages to be verbose.
229 .It Ic edit Op Cm on | off
230 Enable or disable the
232 functionality in a program.
236 List the values of all the terminal capabilities (see
238 .It Ic settc Ar cap Ar val
239 Set the terminal capability
245 No sanity checking is done.
255 Control which tty modes that
257 won't allow the user to change.
269 set of tty modes respectively; defaulting to
272 Without other arguments,
274 lists the modes in the chosen set which are fixed on
279 lists all tty modes in the chosen set regardless of the setting.
287 on or off or removes control of
292 The following editor commands are available for use in key bindings:
293 .\" Section automatically generated with makelist
296 Vi paste previous deletion to the right of the cursor.
298 Vi paste previous deletion to the left of the cursor.
299 .It Ic vi-prev-space-word
300 Vi move to the previous space delimited word.
302 Vi move to the previous word.
303 .It Ic vi-next-space-word
304 Vi move to the next space delimited word.
306 Vi move to the next word.
307 .It Ic vi-change-case
308 Vi change case of character under the cursor and advance one character.
309 .It Ic vi-change-meta
310 Vi change prefix command.
311 .It Ic vi-insert-at-bol
312 Vi enter insert mode at the beginning of line.
313 .It Ic vi-replace-char
314 Vi replace character under the cursor with the next character typed.
315 .It Ic vi-replace-mode
316 Vi enter replace mode.
317 .It Ic vi-substitute-char
318 Vi replace character under the cursor and enter insert mode.
319 .It Ic vi-substitute-line
320 Vi substitute entire line.
321 .It Ic vi-change-to-eol
322 Vi change to end of line.
324 Vi enter insert mode.
326 Vi enter insert mode after the cursor.
328 Vi enter insert mode at end of line.
329 .It Ic vi-delete-meta
330 Vi delete prefix command.
332 Vi move to the end of the current space delimited word.
333 .It Ic vi-to-end-word
334 Vi move to the end of the current word.
337 .It Ic vi-command-mode
338 Vi enter command mode (use alternative key bindings).
340 Vi move to the beginning of line.
341 .It Ic vi-delete-prev-char
342 Vi move to previous character (backspace).
343 .It Ic vi-list-or-eof
344 Vi list choices for completion or indicate end of file if empty line.
345 .It Ic vi-kill-line-prev
346 Vi cut from beginning of line to cursor.
347 .It Ic vi-search-prev
348 Vi search history previous.
349 .It Ic vi-search-next
350 Vi search history next.
351 .It Ic vi-repeat-search-next
352 Vi repeat current search in the same search direction.
353 .It Ic vi-repeat-search-prev
354 Vi repeat current search in the opposite search direction.
356 Vi move to the character specified next.
358 Vi move to the character specified previous.
359 .It Ic vi-to-next-char
360 Vi move up to the character specified next.
361 .It Ic vi-to-prev-char
362 Vi move up to the character specified previous.
363 .It Ic vi-repeat-next-char
364 Vi repeat current character search in the same search direction.
365 .It Ic vi-repeat-prev-char
366 Vi repeat current character search in the opposite search direction.
367 .It Ic em-delete-or-list
368 Delete character under cursor or list completions if at end of line.
369 .It Ic em-delete-next-word
370 Cut from cursor to end of current word.
372 Paste cut buffer at cursor position.
374 Cut the entire line and save in cut buffer.
375 .It Ic em-kill-region
376 Cut area between mark and cursor and save in cut buffer.
377 .It Ic em-copy-region
378 Copy area between mark and cursor to cut buffer.
379 .It Ic em-gosmacs-traspose
380 Exchange the two characters before the cursor.
382 Move next to end of current word.
384 Uppercase the characters from cursor to end of current word.
385 .It Ic em-capitol-case
386 Capitalize the characters from cursor to end of current word.
388 Lowercase the characters from cursor to end of current word.
390 Set the mark at cursor.
391 .It Ic em-exchange-mark
392 Exchange the cursor and mark.
393 .It Ic em-universal-argument
394 Universal argument (argument times 4).
396 Add 8th bit to next character typed.
397 .It Ic em-toggle-overwrite
398 Switch from insert to overwrite mode or vice versa.
399 .It Ic em-copy-prev-word
400 Copy current word to cursor.
401 .It Ic em-inc-search-next
402 Emacs incremental next search.
403 .It Ic em-inc-search-prev
404 Emacs incremental reverse search.
405 .It Ic ed-end-of-file
406 Indicate end of file.
408 Add character to the line.
409 .It Ic ed-delete-prev-word
410 Delete from beginning of current word to cursor.
411 .It Ic ed-delete-next-char
412 Delete character under cursor.
414 Cut to the end of line.
415 .It Ic ed-move-to-end
416 Move cursor to the end of line.
417 .It Ic ed-move-to-beg
418 Move cursor to the beginning of line.
419 .It Ic ed-transpose-chars
420 Exchange the character to the left of the cursor with the one under it.
422 Move to the right one character.
424 Move to the beginning of the current word.
426 Move to the left one character.
427 .It Ic ed-quoted-insert
428 Add the next character typed verbatim.
430 Adds to argument or enters a digit.
431 .It Ic ed-argument-digit
432 Digit that starts argument.
434 Indicates unbound character.
436 Tty interrupt character.
438 Tty delayed suspend character.
439 .It Ic ed-tty-flush-output
440 Tty flush output characters.
441 .It Ic ed-tty-sigquit
443 .It Ic ed-tty-sigtstp
444 Tty suspend character.
445 .It Ic ed-tty-stop-output
446 Tty disallow output characters.
447 .It Ic ed-tty-start-output
448 Tty allow output characters.
451 .It Ic ed-delete-prev-char
452 Delete the character to the left of the cursor.
453 .It Ic ed-clear-screen
454 Clear screen leaving current line at the top.
456 Redisplay everything.
458 Erase current line and start from scratch.
459 .It Ic ed-sequence-lead-in
460 First character in a bound sequence.
461 .It Ic ed-prev-history
462 Move to the previous history line.
463 .It Ic ed-next-history
464 Move to the next history line.
465 .It Ic ed-search-prev-history
466 Search previous in history for a line matching the current.
467 .It Ic ed-search-next-history
468 Search next in history for a line matching the current.
474 Editline extended command.
476 .\" End of section automatically generated with makelist
485 library was written by
486 .An Christos Zoulas ,
487 and this manual was written by
489 with some sections inspired by