2333
|
1 @comment %**start of header (This is for running Texinfo on a region.) |
|
2 @c @setfilename rluser.info |
|
3 @comment %**end of header (This is for running Texinfo on a region.) |
|
4 @c @setchapternewpage odd |
|
5 |
|
6 @ignore |
|
7 This file documents the end user interface to the GNU command line |
|
8 editing features. It is to be an appendix to manuals for programs which |
|
9 use these features. There is a document entitled "readline.texinfo" |
|
10 which contains both end-user and programmer documentation for the GNU |
|
11 Readline Library. |
|
12 |
|
13 Copyright (C) 1988 Free Software Foundation, Inc. |
|
14 |
|
15 Authored by Brian Fox. |
|
16 |
|
17 Permission is granted to process this file through Tex and print the |
|
18 results, provided the printed document carries copying permission notice |
|
19 identical to this one except for the removal of this paragraph (this |
|
20 paragraph not being relevant to the printed manual). |
|
21 |
|
22 Permission is granted to make and distribute verbatim copies of this manual |
|
23 provided the copyright notice and this permission notice are preserved on |
|
24 all copies. |
|
25 |
|
26 Permission is granted to copy and distribute modified versions of this |
|
27 manual under the conditions for verbatim copying, provided also that the |
|
28 GNU Copyright statement is available to the distributee, and provided that |
|
29 the entire resulting derived work is distributed under the terms of a |
|
30 permission notice identical to this one. |
|
31 |
|
32 Permission is granted to copy and distribute translations of this manual |
|
33 into another language, under the above conditions for modified versions. |
|
34 @end ignore |
|
35 |
|
36 @node Command Line Editing, Using Info, Trouble, Top |
|
37 @appendix Command Line Editing |
|
38 |
|
39 This text describes GNU's command line editing interface. It is |
|
40 relatively old and may not be entirely correct now. Please send a |
|
41 message to @code{bug-octave@@bevo.che.wisc.edu} if you find any errors. |
|
42 @xref{Reporting Bugs}, for more information about how to report bugs. |
|
43 |
|
44 @menu |
|
45 * Introduction and Notation:: Notation used in this text. |
|
46 * Readline Interaction:: The minimum set of commands for editing a line. |
|
47 * Readline Bare Essentials:: |
|
48 * Readline Movement Commands:: |
|
49 * Readline Killing Commands:: |
|
50 * Readline Arguments:: |
|
51 * Readline Init File:: Customizing Readline from a user's view. |
|
52 * Readline Init Syntax:: |
|
53 * Readline Vi Mode:: |
|
54 @end menu |
|
55 |
|
56 @node Introduction and Notation, Readline Interaction, Command Line Editing, Command Line Editing |
|
57 @appendixsec Introduction to Line Editing |
|
58 |
|
59 The following paragraphs describe the notation we use to represent |
|
60 keystrokes. |
|
61 |
|
62 The text @key{C-k} is read as `Control-K' and describes the character |
|
63 produced when the Control key is depressed and the @key{k} key is struck. |
|
64 |
|
65 The text @key{M-k} is read as `Meta-K' and describes the character |
|
66 produced when the meta key (if you have one) is depressed, and the @key{k} |
|
67 key is struck. If you do not have a meta key, the identical keystroke |
|
68 can be generated by typing @key{ESC} @i{first}, and then typing @key{k}. |
|
69 Either process is known as @dfn{metafying} the @key{k} key. |
|
70 |
|
71 The text @key{M-C-k} is read as `Meta-Control-k' and describes the |
|
72 character produced by @dfn{metafying} @key{C-k}. |
|
73 |
|
74 In addition, several keys have their own names. Specifically, |
|
75 @key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all |
|
76 stand for themselves when seen in this text, or in an init file |
|
77 (@pxref{Readline Init File}, for more info). |
|
78 |
|
79 @node Readline Interaction, Readline Bare Essentials, Introduction and Notation, Command Line Editing |
|
80 @appendixsec Readline Interaction |
|
81 @cindex interaction, readline |
|
82 |
|
83 Often during an interactive session you type in a long line of text, |
|
84 only to notice that the first word on the line is misspelled. The |
|
85 Readline library gives you a set of commands for manipulating the text |
|
86 as you type it in, allowing you to just fix your typo, and not forcing |
|
87 you to retype the majority of the line. Using these editing commands, |
|
88 you move the cursor to the place that needs correction, and delete or |
|
89 insert the text of the corrections. Then, when you are satisfied with |
|
90 the line, you simply press @key{RETURN}. You do not have to be at the |
|
91 end of the line to press @key{RETURN}; the entire line is accepted |
|
92 regardless of the location of the cursor within the line. |
|
93 |
|
94 @menu |
|
95 * Readline Bare Essentials:: The least you need to know about Readline. |
|
96 * Readline Movement Commands:: Moving about the input line. |
|
97 * Readline Killing Commands:: How to delete text, and how to get it back! |
|
98 * Readline Arguments:: Giving numeric arguments to commands. |
|
99 @end menu |
|
100 |
|
101 @node Readline Bare Essentials, Readline Movement Commands, Readline Interaction, Command Line Editing |
|
102 @appendixsec Readline Bare Essentials |
|
103 |
|
104 In order to enter characters into the line, simply type them. The typed |
|
105 character appears where the cursor was, and then the cursor moves one |
|
106 space to the right. If you mistype a character, you can use @key{DEL} to |
|
107 back up, and delete the mistyped character. |
|
108 |
|
109 Sometimes you may miss typing a character that you wanted to type, and |
|
110 not notice your error until you have typed several other characters. In |
|
111 that case, you can type @key{C-b} to move the cursor to the left, and then |
|
112 correct your mistake. Afterwards, you can move the cursor to the right |
|
113 with @key{C-f}. |
|
114 |
|
115 When you add text in the middle of a line, you will notice that characters |
|
116 to the right of the cursor get `pushed over' to make room for the text |
|
117 that you have inserted. Likewise, when you delete text behind the cursor, |
|
118 characters to the right of the cursor get `pulled back' to fill in the |
|
119 blank space created by the removal of the text. A list of the basic bare |
|
120 essentials for editing the text of an input line follows. |
|
121 |
|
122 @table @asis |
|
123 @item @key{C-b} |
|
124 Move back one character. |
|
125 @item @key{C-f} |
|
126 Move forward one character. |
|
127 @item @key{DEL} |
|
128 Delete the character to the left of the cursor. |
|
129 @item @key{C-d} |
|
130 Delete the character underneath the cursor. |
|
131 @item @w{Printing characters} |
|
132 Insert itself into the line at the cursor. |
|
133 @item @key{C-_} |
|
134 Undo the last thing that you did. You can undo all the way back to an |
|
135 empty line. |
|
136 @end table |
|
137 |
|
138 @node Readline Movement Commands, Readline Killing Commands, Readline Bare Essentials, Command Line Editing |
|
139 @appendixsec Readline Movement Commands |
|
140 |
|
141 |
|
142 The above table describes the most basic possible keystrokes that you need |
|
143 in order to do editing of the input line. For your convenience, many |
|
144 other commands have been added in addition to @key{C-b}, @key{C-f}, |
|
145 @key{C-d}, and @key{DEL}. Here are some commands for moving more rapidly |
|
146 about the line. |
|
147 |
|
148 @table @key |
|
149 @item C-a |
|
150 Move to the start of the line. |
|
151 @item C-e |
|
152 Move to the end of the line. |
|
153 @item M-f |
|
154 Move forward a word. |
|
155 @item M-b |
|
156 Move backward a word. |
|
157 @item C-l |
|
158 Clear the screen, reprinting the current line at the top. |
|
159 @end table |
|
160 |
|
161 Notice how @key{C-f} moves forward a character, while @key{M-f} moves |
|
162 forward a word. It is a loose convention that control keystrokes |
|
163 operate on characters while meta keystrokes operate on words. |
|
164 |
|
165 @node Readline Killing Commands, Readline Arguments, Readline Movement Commands, Command Line Editing |
|
166 @appendixsec Readline Killing Commands |
|
167 |
|
168 @dfn{Killing} text means to delete the text from the line, but to save |
|
169 it away for later use, usually by @dfn{yanking} it back into the line. |
|
170 If the description for a command says that it `kills' text, then you can |
|
171 be sure that you can get the text back in a different (or the same) |
|
172 place later. |
|
173 |
|
174 Here is the list of commands for killing text. |
|
175 |
|
176 @table @key |
|
177 @item C-k |
|
178 Kill the text from the current cursor position to the end of the line. |
|
179 |
|
180 @item M-d |
|
181 Kill from the cursor to the end of the current word, or if between |
|
182 words, to the end of the next word. |
|
183 |
|
184 @item M-DEL |
|
185 Kill from the cursor to the start of the previous word, or if between |
|
186 words, to the start of the previous word. |
|
187 |
|
188 @item C-w |
|
189 Kill from the cursor to the previous whitespace. This is different than |
|
190 @key{M-DEL} because the word boundaries differ. |
|
191 |
|
192 @end table |
|
193 |
|
194 And, here is how to @dfn{yank} the text back into the line. Yanking |
|
195 is |
|
196 |
|
197 @table @key |
|
198 @item C-y |
|
199 Yank the most recently killed text back into the buffer at the cursor. |
|
200 |
|
201 @item M-y |
|
202 Rotate the kill-ring, and yank the new top. You can only do this if |
|
203 the prior command is @key{C-y} or @key{M-y}. |
|
204 @end table |
|
205 |
|
206 When you use a kill command, the text is saved in a @dfn{kill-ring}. |
|
207 Any number of consecutive kills save all of the killed text together, so |
|
208 that when you yank it back, you get it in one clean sweep. The kill |
|
209 ring is not line specific; the text that you killed on a previously |
|
210 typed line is available to be yanked back later, when you are typing |
|
211 another line. |
|
212 |
|
213 @node Readline Arguments, Readline Init File, Readline Killing Commands, Command Line Editing |
|
214 @appendixsec Readline Arguments |
|
215 |
|
216 You can pass numeric arguments to Readline commands. Sometimes the |
|
217 argument acts as a repeat count, other times it is the @i{sign} of the |
|
218 argument that is significant. If you pass a negative argument to a |
|
219 command which normally acts in a forward direction, that command will |
|
220 act in a backward direction. For example, to kill text back to the |
|
221 start of the line, you might type @key{M--} @key{C-k}. |
|
222 |
|
223 The general way to pass numeric arguments to a command is to type meta |
|
224 digits before the command. If the first `digit' you type is a minus |
|
225 sign (@key{-}), then the sign of the argument will be negative. Once |
|
226 you have typed one meta digit to get the argument started, you can type |
|
227 the remainder of the digits, and then the command. For example, to give |
|
228 the @key{C-d} command an argument of 10, you could type @key{M-1 0 C-d}. |
|
229 |
|
230 |
|
231 @node Readline Init File, Readline Init Syntax, Readline Arguments, Command Line Editing |
|
232 @appendixsec Readline Init File |
|
233 |
|
234 Although the Readline library comes with a set of Emacs-like |
|
235 keybindings, it is possible that you would like to use a different set |
|
236 of keybindings. You can customize programs that use Readline by putting |
|
237 commands in an @dfn{init} file in your home directory. The name of this |
|
238 file is @file{~/.inputrc}. |
|
239 |
|
240 When a program which uses the Readline library starts up, the |
|
241 @file{~/.inputrc} file is read, and the keybindings are set. |
|
242 |
|
243 In addition, the @key{C-x C-r} command re-reads this init file, thus |
|
244 incorporating any changes that you might have made to it. |
|
245 |
|
246 @menu |
|
247 * Readline Init Syntax:: Syntax for the commands in @file{~/.inputrc}. |
|
248 * Readline Vi Mode:: Switching to @code{vi} mode in Readline. |
|
249 @end menu |
|
250 |
|
251 @node Readline Init Syntax, Readline Vi Mode, Readline Init File, Command Line Editing |
|
252 @appendixsec Readline Init Syntax |
|
253 |
|
254 There are only four constructs allowed in the @file{~/.inputrc} |
|
255 file: |
|
256 |
|
257 @table @asis |
|
258 @item Variable Settings |
|
259 You can change the state of a few variables in Readline. You do this by |
|
260 using the @code{set} command within the init file. Here is how you |
|
261 would specify that you wish to use Vi line editing commands: |
|
262 |
|
263 @example |
|
264 set editing-mode vi |
|
265 @end example |
|
266 |
|
267 Right now, there are only a few variables which can be set; so few in |
|
268 fact, that we just iterate them here: |
|
269 |
|
270 @table @code |
|
271 |
|
272 @item editing-mode |
|
273 @vindex editing-mode |
|
274 The @code{editing-mode} variable controls which editing mode you are |
|
275 using. By default, GNU Readline starts up in Emacs editing mode, where |
|
276 the keystrokes are most similar to Emacs. This variable can either be |
|
277 set to @code{emacs} or @code{vi}. |
|
278 |
|
279 @item horizontal-scroll-mode |
|
280 @vindex horizontal-scroll-mode |
|
281 This variable can either be set to @code{On} or @code{Off}. Setting it |
|
282 to @code{On} means that the text of the lines that you edit will scroll |
|
283 horizontally on a single screen line when they are larger than the width |
|
284 of the screen, instead of wrapping onto a new screen line. By default, |
|
285 this variable is set to @code{Off}. |
|
286 |
|
287 @item mark-modified-lines |
|
288 @vindex mark-modified-lines |
|
289 This variable when set to @code{On}, says to display an asterisk |
|
290 (@samp{*}) at the starts of history lines which have been modified. |
|
291 This variable is off by default. |
|
292 |
|
293 @item prefer-visible-bell |
|
294 @vindex prefer-visible-bell |
|
295 If this variable is set to @code{On} it means to use a visible bell if |
|
296 one is available, rather than simply ringing the terminal bell. By |
|
297 default, the value is @code{Off}. |
|
298 @end table |
|
299 |
|
300 @item Key Bindings |
|
301 The syntax for controlling keybindings in the @file{~/.inputrc} file is |
|
302 simple. First you have to know the @i{name} of the command that you |
|
303 want to change. The following pages contain tables of the command name, |
|
304 the default keybinding, and a short description of what the command |
|
305 does. |
|
306 |
|
307 Once you know the name of the command, simply place the name of the key |
|
308 you wish to bind the command to, a colon, and then the name of the |
|
309 command on a line in the @file{~/.inputrc} file. The name of the key |
|
310 can be expressed in different ways, depending on which is most |
|
311 comfortable for you. |
|
312 |
|
313 @table @asis |
|
314 @item @w{@var{keyname}: @var{function-name} or @var{macro}} |
|
315 @var{keyname} is the name of a key spelled out in English. For example: |
|
316 @example |
|
317 Control-u: universal-argument |
|
318 Meta-Rubout: backward-kill-word |
|
319 Control-o: ">&output" |
|
320 @end example |
|
321 |
|
322 In the above example, @key{C-u} is bound to the function |
|
323 @code{universal-argument}, and @key{C-o} is bound to run the macro |
|
324 expressed on the right hand side (that is, to insert the text |
|
325 @samp{>&output} into the line). |
|
326 |
|
327 @item @w{"@var{keyseq}": @var{function-name} or @var{macro}} |
|
328 @var{keyseq} differs from @var{keyname} above in that strings denoting |
|
329 an entire key sequence can be specified. Simply place the key sequence |
|
330 in double quotes. GNU Emacs style key escapes can be used, as in the |
|
331 following example: |
|
332 |
|
333 @example |
|
334 "\C-u": universal-argument |
|
335 "\C-x\C-r": re-read-init-file |
|
336 "\e[11~": "Function Key 1" |
|
337 @end example |
|
338 |
|
339 In the above example, @key{C-u} is bound to the function |
|
340 @code{universal-argument} (just as it was in the first example), |
|
341 @key{C-x C-r} is bound to the function @code{re-read-init-file}, and |
|
342 @key{ESC [ 1 1 ~} is bound to insert the text @samp{Function Key 1}. |
|
343 |
|
344 @end table |
|
345 @end table |
|
346 |
|
347 @menu |
|
348 * Commands For Moving:: Moving about the line. |
|
349 * Commands For History:: Getting at previous lines. |
|
350 * Commands For Text:: Commands for changing text. |
|
351 * Commands For Killing:: Commands for killing and yanking. |
|
352 * Numeric Arguments:: Specifying numeric arguments, repeat counts. |
|
353 * Commands For Completion:: Getting Readline to do the typing for you. |
|
354 * Miscellaneous Commands:: Other miscellaneous commands. |
|
355 @end menu |
|
356 |
|
357 @node Commands For Moving, Commands For History, Readline Init Syntax, Readline Init Syntax |
|
358 @appendixsubsec Commands For Moving |
|
359 @ftable @code |
|
360 @item beginning-of-line (@key{C-a}) |
|
361 Move to the start of the current line. |
|
362 |
|
363 @item end-of-line (@key{C-e}) |
|
364 Move to the end of the line. |
|
365 |
|
366 @item forward-char (@key{C-f}) |
|
367 Move forward a character. |
|
368 |
|
369 @item backward-char (@key{C-b}) |
|
370 Move back a character. |
|
371 |
|
372 @item forward-word (@key{M-f}) |
|
373 Move forward to the end of the next word. |
|
374 |
|
375 @item backward-word (@key{M-b}) |
|
376 Move back to the start of this, or the previous, word. |
|
377 |
|
378 @item clear-screen (@key{C-l}) |
|
379 Clear the screen leaving the current line at the top of the screen. |
|
380 |
|
381 @end ftable |
|
382 |
|
383 @node Commands For History, Commands For Text, Commands For Moving, Readline Init Syntax |
|
384 @appendixsubsec Commands For Manipulating The History |
|
385 |
|
386 @ftable @code |
|
387 @item accept-line (Newline, Return) |
|
388 Accept the line regardless of where the cursor is. If this line is |
|
389 non-empty, add it to the history list. If this line was a history |
|
390 line, then restore the history line to its original state. |
|
391 |
|
392 @item previous-history (@key{C-p}) |
|
393 Move `up' through the history list. |
|
394 |
|
395 @item next-history (@key{C-n}) |
|
396 Move `down' through the history list. |
|
397 |
|
398 @item beginning-of-history (@key{M-<}) |
|
399 Move to the first line in the history. |
|
400 |
|
401 @item end-of-history (@key{M->}) |
|
402 Move to the end of the input history, i.e., the line you are entering! |
|
403 |
|
404 @item reverse-search-history (@key{C-r}) |
|
405 Search backward starting at the current line and moving `up' through |
|
406 the history as necessary. This is an incremental search. |
|
407 |
|
408 @item forward-search-history (@key{C-s}) |
|
409 Search forward starting at the current line and moving `down' through |
|
410 the the history as necessary. |
|
411 |
|
412 @end ftable |
|
413 |
|
414 @node Commands For Text, Commands For Killing, Commands For History, Readline Init Syntax |
|
415 @appendixsubsec Commands For Changing Text |
|
416 |
|
417 @ftable @code |
|
418 @item delete-char (@key{C-d}) |
|
419 Delete the character under the cursor. If the cursor is at the |
|
420 beginning of the line, and there are no characters in the line, and |
|
421 the last character typed was not @key{C-d}, then return EOF. |
|
422 |
|
423 @item backward-delete-char (Rubout) |
|
424 Delete the character behind the cursor. A numeric arg says to kill |
|
425 the characters instead of deleting them. |
|
426 |
|
427 @item quoted-insert (@key{C-q}, @key{C-v}) |
|
428 Add the next character that you type to the line verbatim. This is |
|
429 how to insert things like @key{C-q} for example. |
|
430 |
|
431 @item tab-insert (@key{M-TAB}) |
|
432 Insert a tab character. |
|
433 |
|
434 @item self-insert (a, b, A, 1, !, ...) |
|
435 Insert yourself. |
|
436 |
|
437 @item transpose-chars (@key{C-t}) |
|
438 Drag the character before point forward over the character at point. |
|
439 Point moves forward as well. If point is at the end of the line, then |
|
440 transpose the two characters before point. Negative args don't work. |
|
441 |
|
442 @item transpose-words (@key{M-t}) |
|
443 Drag the word behind the cursor past the word in front of the cursor |
|
444 moving the cursor over that word as well. |
|
445 |
|
446 @item upcase-word (@key{M-u}) |
|
447 Uppercase the current (or following) word. With a negative argument, |
|
448 do the previous word, but do not move point. |
|
449 |
|
450 @item downcase-word (@key{M-l}) |
|
451 Lowercase the current (or following) word. With a negative argument, |
|
452 do the previous word, but do not move point. |
|
453 |
|
454 @item capitalize-word (@key{M-c}) |
|
455 Uppercase the current (or following) word. With a negative argument, |
|
456 do the previous word, but do not move point. |
|
457 |
|
458 @end ftable |
|
459 |
|
460 @node Commands For Killing, Numeric Arguments, Commands For Text, Readline Init Syntax |
|
461 @appendixsubsec Killing And Yanking |
|
462 |
|
463 @ftable @code |
|
464 |
|
465 @item kill-line (@key{C-k}) |
|
466 Kill the text from the current cursor position to the end of the line. |
|
467 |
|
468 @item backward-kill-line () |
|
469 Kill backward to the beginning of the line. This is normally unbound. |
|
470 |
|
471 @item kill-word (@key{M-d}) |
|
472 Kill from the cursor to the end of the current word, or if between |
|
473 words, to the end of the next word. |
|
474 |
|
475 @item backward-kill-word (@key{M-DEL}) |
|
476 Kill the word behind the cursor. |
|
477 |
|
478 @item unix-line-discard (@key{C-u}) |
|
479 Do what @key{C-u} used to do in Unix line input. We save the killed text on |
|
480 the kill-ring, though. |
|
481 |
|
482 @item unix-word-rubout (@key{C-w}) |
|
483 Do what @key{C-w} used to do in Unix line input. The killed text is saved |
|
484 on the kill-ring. This is different than backward-kill-word because |
|
485 the word boundaries differ. |
|
486 |
|
487 @item yank (@key{C-y}) |
|
488 Yank the top of the kill ring into the buffer at point. |
|
489 |
|
490 @item yank-pop (@key{M-y}) |
|
491 Rotate the kill-ring, and yank the new top. You can only do this if |
|
492 the prior command is yank or yank-pop. |
|
493 @end ftable |
|
494 |
|
495 @node Numeric Arguments, Commands For Completion, Commands For Killing, Readline Init Syntax |
|
496 @appendixsubsec Specifying Numeric Arguments |
|
497 @ftable @code |
|
498 |
|
499 @item digit-argument (@key{M-0}, @key{M-1}, ... @key{M--}) |
|
500 Add this digit to the argument already accumulating, or start a new |
|
501 argument. @key{M--} starts a negative argument. |
|
502 |
|
503 @item universal-argument () |
|
504 Do what @key{C-u} does in emacs. By default, this is not bound. |
|
505 @end ftable |
|
506 |
|
507 |
|
508 @node Commands For Completion, Miscellaneous Commands, Numeric Arguments, Readline Init Syntax |
|
509 @appendixsubsec Letting Readline Type For You |
|
510 |
|
511 @ftable @code |
|
512 @item complete (TAB) |
|
513 Attempt to do completion on the text before point. This is |
|
514 implementation defined. Generally, if you are typing a file name |
|
515 argument, you can do file name completion; if you are typing a command, |
|
516 you can do command completion, if you are typing in a symbol to GDB, you |
|
517 can do symbol name completion, if you are typing in a variable to Bash, |
|
518 you can do variable name completion... |
|
519 |
|
520 @item possible-completions (M-?) |
|
521 List the possible completions of the text before point. |
|
522 @end ftable |
|
523 |
|
524 @node Miscellaneous Commands, , Commands For Completion, Readline Init Syntax |
|
525 @appendixsubsec Some Miscellaneous Commands |
|
526 @ftable @code |
|
527 |
|
528 @item re-read-init-file (@key{C-x} @key{C-r}) |
|
529 Read in the contents of your @file{~/.inputrc} file, and incorporate |
|
530 any bindings found there. |
|
531 |
|
532 @item abort (@key{C-g}) |
|
533 Ding! Stops things. |
|
534 |
|
535 @item do-uppercase-version (@key{M-a}, @key{M-b}, ...) |
|
536 Run the command that is bound to your uppercase brother. |
|
537 |
|
538 @item prefix-meta (ESC) |
|
539 Make the next character that you type be metafied. This is for people |
|
540 without a meta key. Typing @key{ESC f} is equivalent to typing |
|
541 @key{M-f}. |
|
542 |
|
543 @item undo (@key{C-_}) |
|
544 Incremental undo, separately remembered for each line. |
|
545 |
|
546 @item revert-line (@key{M-r}) |
|
547 Undo all changes made to this line. This is like typing the `undo' |
|
548 command enough times to get back to the beginning. |
|
549 @end ftable |
|
550 |
|
551 @node Readline Vi Mode, , Readline Init Syntax, Command Line Editing |
|
552 @appendixsec Readline Vi Mode |
|
553 |
|
554 While the Readline library does not have a full set of Vi editing |
|
555 functions, it does contain enough to allow simple editing of the line. |
|
556 |
|
557 In order to switch interactively between Emacs and Vi editing modes, use |
|
558 the command @key{M-C-j} (toggle-editing-mode). |
|
559 |
|
560 When you enter a line in Vi mode, you are already placed in `insertion' |
|
561 mode, as if you had typed an `i'. Pressing @key{ESC} switches you into |
|
562 `edit' mode, where you can edit the text of the line with the standard |
|
563 Vi movement keys, move to previous history lines with `k', and following |
|
564 lines with `j', and so forth. |
|
565 |