1EDITRC(5)                   BSD File Formats Manual                  EDITRC(5)
2

NAME

4     editrc — configuration file for editline library
5

SYNOPSIS

7     editrc
8

DESCRIPTION

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

BUILTIN COMMANDS

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

EDITOR COMMANDS

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

SEE ALSO

403     editline(3), regex(3), termcap(5)
404

AUTHORS

406     The editline library was written by Christos Zoulas, and this manual was
407     written by Luke Mewburn, with some sections inspired by tcsh(1).
408
409BSD                            October 18, 2003                            BSD
Impressum