1EDITRC(5)                     File Formats Manual                    EDITRC(5)
2
3
4

NAME

6       editrc - configuration file for editline library
7

SYNOPSIS

9       editrc
10

DESCRIPTION

12       The  editrc file defines various settings to be used by the editline(3)
13       library.
14
15       The format of each line is: [prog:]command [arg [...]]
16
17       command is one of the editline(3) builtin commands.  Refer  to  BUILTIN
18       COMMANDS for more information.
19
20       prog  is  the  program name string that a program defines when it calls
21       el_init(3) to set up editline(3), which is  usually  argv[0].   command
22       will be executed for any program which matches prog.
23
24       prog  may  also  be  a regex(3) style regular expression, in which case
25       command will be executed for  any  program  that  matches  the  regular
26       expression.
27
28       If prog is absent, command is executed for all programs.
29

BUILTIN COMMANDS

31       The  editline  library  has some builtin commands, which affect the way
32       that the line editing and history functions operate.  These  are  based
33       on similar named builtins present in the tcsh(1) shell.
34
35       The following builtin commands are available:
36
37       bind Oo Fl a Oc Oo Fl e Oc Oo Fl k Oc Oo Fl l Oc Oo Fl r Oc \fP
38              Oo  Fl  s  Oc  Oo  Fl  v  Oc  Oo Ar key Op Ar command Oc Without
39              options, list all bound keys, and the editor  command  to  which
40              each  is  bound.  If key is supplied, show the bindings for key.
41              If key command  is  supplied,  bind  command  to  key.   Options
42              include:
43
44              -e     Bind all keys to the standard GNU Emacs-like bindings.
45
46              -v     Bind all keys to the standard vi(1) -like bindings.
47
48              -a     List  or  change key bindings in the vi(1) mode alternate
49                     (command mode) key map.
50
51              -k     key is interpreted as a symbolic arrow  key  name,  which
52                     may be one of `up', `down', `left' or `right'.
53
54              -l     List all editor commands and a short description of each.
55
56              -r     Remove a key's binding.
57
58              -s     command  is taken as a literal string and treated as ter‐
59                     minal input when key is typed.  Bound keys in command are
60                     themselves reinterpreted, and this continues for ten lev‐
61                     els of interpretation.
62
63       command may be one of the commands documented in EDITOR COMMANDS below,
64       or another key.
65
66       key and command can contain control characters of the form `^character'
67       ( e.g.  `^A' ), and the following backslashed escape sequences:
68
69
70              \a     Bell
71
72              \b     Backspace
73
74              \e     Escape
75
76              \f     Formfeed
77
78              \n     Newline
79
80              \r     Carriage return
81
82              \t     Horizontal tab
83
84              \v     Vertical tab
85
86              \nnn   The ASCII character corresponding  to  the  octal  number
87                     nnn.
88
89       `\' nullifies the special meaning of the following character, if it has
90       any, notably `\' and `^'.
91
92       echotc Oo Fl sv Oc arg ...
93              Exercise terminal capabilities given in  arg  ....   If  arg  is
94              `baud',  `cols', `lines', `rows', `meta' or `tabs', the value of
95              that capability is printed, with ``yes''  or  ``no''  indicating
96              that the terminal does or does not have that capability.
97
98              -s returns an empty string for non-existent capabilities, rather
99              than causing an error.  -v causes messages to be verbose.
100
101       edit [on | off]
102              Enable or disable the editline functionality in a program.
103
104       history list | size n | unique n
105              The list command lists all entries in  the  history.   The  size
106              command  sets the history size to n entries.  The unique command
107              controls if history should keep duplicate entries.  If n is  non
108              zero, only keep unique history entries.  If n is zero, then keep
109              all entries (the default).
110
111       telltc List the values of all  the  terminal  capabilities  (see  term‐
112              cap(5)) .
113
114       settc cap val
115              Set  the  terminal  capability  cap  to val, as defined in term‐
116              cap(5).  No sanity checking is done.
117
118       setty Oo Fl a Oc Oo Fl d Oc Oo Fl q Oc Oo Fl x Oc Oo +mode Oc \fP
119              Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc Control  which  tty
120              modes  that editrc won't allow the user to change.  -d, -q or -x
121              tells setty to act on the `edit', `quote' or  `execute'  set  of
122              tty modes respectively; defaulting to -x.
123
124              Without other arguments, setty lists the modes in the chosen set
125              which are fixed on ( `+mode' ) or off ( `-mode' ).  -a lists all
126              tty  modes  in  the  chosen set regardless of the setting.  With
127              +mode, -mode or mode, fixes mode on or off or removes control of
128              mode in the chosen set.
129
130              Setty  can also be used to set tty characters to particular val‐
131              ues using char=value.  If value is empty then the  character  is
132              set to _POSIX_VDISABLE .
133

EDITOR COMMANDS

135       The following editor commands are available for use in key bindings:
136
137       vi-paste-next
138              Vi paste previous deletion to the right of the cursor.
139
140       vi-paste-prev
141              Vi paste previous deletion to the left of the cursor.
142
143       vi-prev-space-word
144              Vi move to the previous space delimited word.
145
146       vi-prev-word
147              Vi move to the previous word.
148
149       vi-next-space-word
150              Vi move to the next space delimited word.
151
152       vi-next-word
153              Vi move to the next word.
154
155       vi-change-case
156              Vi  change  case  of  character under the cursor and advance one
157              character.
158
159       vi-change-meta
160              Vi change prefix command.
161
162       vi-insert-at-bol
163              Vi enter insert mode at the beginning of line.
164
165       vi-replace-char
166              Vi replace character under the cursor with  the  next  character
167              typed.
168
169       vi-replace-mode
170              Vi enter replace mode.
171
172       vi-substitute-char
173              Vi replace character under the cursor and enter insert mode.
174
175       vi-substitute-line
176              Vi substitute entire line.
177
178       vi-change-to-eol
179              Vi change to end of line.
180
181       vi-insert
182              Vi enter insert mode.
183
184       vi-add Vi enter insert mode after the cursor.
185
186       vi-add-at-eol
187              Vi enter insert mode at end of line.
188
189       vi-delete-meta
190              Vi delete prefix command.
191
192       vi-end-word
193              Vi move to the end of the current space delimited word.
194
195       vi-to-end-word
196              Vi move to the end of the current word.
197
198       vi-undo
199              Vi undo last change.
200
201       vi-command-mode
202              Vi enter command mode (use alternative key bindings).
203
204       vi-zero
205              Vi move to the beginning of line.
206
207       vi-delete-prev-char
208              Vi move to previous character (backspace).
209
210       vi-list-or-eof
211              Vi  list choices for completion or indicate end of file if empty
212              line.
213
214       vi-kill-line-prev
215              Vi cut from beginning of line to cursor.
216
217       vi-search-prev
218              Vi search history previous.
219
220       vi-search-next
221              Vi search history next.
222
223       vi-repeat-search-next
224              Vi repeat current search in the same search direction.
225
226       vi-repeat-search-prev
227              Vi repeat current search in the opposite search direction.
228
229       vi-next-char
230              Vi move to the character specified next.
231
232       vi-prev-char
233              Vi move to the character specified previous.
234
235       vi-to-next-char
236              Vi move up to the character specified next.
237
238       vi-to-prev-char
239              Vi move up to the character specified previous.
240
241       vi-repeat-next-char
242              Vi repeat current character search in the same search direction.
243
244       vi-repeat-prev-char
245              Vi repeat current character search in the opposite search direc‐
246              tion.
247
248       em-delete-or-list
249              Delete  character  under cursor or list completions if at end of
250              line.
251
252       em-delete-next-word
253              Cut from cursor to end of current word.
254
255       em-yank
256              Paste cut buffer at cursor position.
257
258       em-kill-line
259              Cut the entire line and save in cut buffer.
260
261       em-kill-region
262              Cut area between mark and cursor and save in cut buffer.
263
264       em-copy-region
265              Copy area between mark and cursor to cut buffer.
266
267       em-gosmacs-transpose
268              Exchange the two characters before the cursor.
269
270       em-next-word
271              Move next to end of current word.
272
273       em-upper-case
274              Uppercase the characters from cursor to end of current word.
275
276       em-capitol-case
277              Capitalize the characters from cursor to end of current word.
278
279       em-lower-case
280              Lowercase the characters from cursor to end of current word.
281
282       em-set-mark
283              Set the mark at cursor.
284
285       em-exchange-mark
286              Exchange the cursor and mark.
287
288       em-universal-argument
289              Universal argument (argument times 4).
290
291       em-meta-next
292              Add 8th bit to next character typed.
293
294       em-toggle-overwrite
295              Switch from insert to overwrite mode or vice versa.
296
297       em-copy-prev-word
298              Copy current word to cursor.
299
300       em-inc-search-next
301              Emacs incremental next search.
302
303       em-inc-search-prev
304              Emacs incremental reverse search.
305
306       ed-end-of-file
307              Indicate end of file.
308
309       ed-insert
310              Add character to the line.
311
312       ed-delete-prev-word
313              Delete from beginning of current word to cursor.
314
315       ed-delete-next-char
316              Delete character under cursor.
317
318       ed-kill-line
319              Cut to the end of line.
320
321       ed-move-to-end
322              Move cursor to the end of line.
323
324       ed-move-to-beg
325              Move cursor to the beginning of line.
326
327       ed-transpose-chars
328              Exchange the character to the left of the cursor  with  the  one
329              under it.
330
331       ed-next-char
332              Move to the right one character.
333
334       ed-prev-word
335              Move to the beginning of the current word.
336
337       ed-prev-char
338              Move to the left one character.
339
340       ed-quoted-insert
341              Add the next character typed verbatim.
342
343       ed-digit
344              Adds to argument or enters a digit.
345
346       ed-argument-digit
347              Digit that starts argument.
348
349       ed-unassigned
350              Indicates unbound character.
351
352       ed-tty-sigint
353              Tty interrupt character.
354
355       ed-tty-dsusp
356              Tty delayed suspend character.
357
358       ed-tty-flush-output
359              Tty flush output characters.
360
361       ed-tty-sigquit
362              Tty quit character.
363
364       ed-tty-sigtstp
365              Tty suspend character.
366
367       ed-tty-stop-output
368              Tty disallow output characters.
369
370       ed-tty-start-output
371              Tty allow output characters.
372
373       ed-newline
374              Execute command.
375
376       ed-delete-prev-char
377              Delete the character to the left of the cursor.
378
379       ed-clear-screen
380              Clear screen leaving current line at the top.
381
382       ed-redisplay
383              Redisplay everything.
384
385       ed-start-over
386              Erase current line and start from scratch.
387
388       ed-sequence-lead-in
389              First character in a bound sequence.
390
391       ed-prev-history
392              Move to the previous history line.
393
394       ed-next-history
395              Move to the next history line.
396
397       ed-search-prev-history
398              Search previous in history for a line matching the current.
399
400       ed-search-next-history
401              Search next in history for a line matching the current.
402
403       ed-prev-line
404              Move up one line.
405
406       ed-next-line
407              Move down one line.
408
409       ed-command
410              Editline extended command.
411

SEE ALSO

413       editline(3), regex(3), termcap(5)
414

AUTHORS

416       The  editline  library  was written by Christos Zoulas, and this manual
417       was written by Luke Mewburn, with some sections inspired by tcsh(1).
418
419
420
421                               October 18, 2003                      EDITRC(5)
Impressum