1 @comment Copyright (c) 1994
2 @c $NetBSD: vi.cmd.texi,v 1.1.1.2 2008/05/18 14:31:02 aymeric Exp $
3 @comment The Regents of the University of California. All rights reserved.
4 @comment Copyright (c) 1994, 1995, 1996
5 @comment Keith Bostic. All rights reserved.
7 @comment See the LICENSE file for redistribution information.
9 @comment Id: vi.cmd.texi,v 8.1 2001/08/18 20:43:49 skimo Exp (Berkeley) Date: 2001/08/18 20:43:49
11 @chapter Vi Description
13 @CO{Vi} takes up the entire screen to display the edited file,
14 except for the bottom line of the screen.
15 The bottom line of the screen is used to enter
19 error and informational messages.
20 If no other information is being displayed,
21 the default display can show the current cursor row and cursor column,
22 an indication of whether the file has been modified,
23 and the current mode of the editor.
28 options for more information.
30 Empty lines do not have any special representation on the screen,
31 but lines on the screen that would logically come after the end of
32 the file are displayed as a single tilde
35 To differentiate between empty lines and lines consisting of only
36 whitespace characters, use the
39 Historically, implementations of
41 have also displayed some lines as single asterisk
44 These were lines that were not correctly displayed, i.e. lines on the
45 screen that did not correspond to lines in the file, or lines that did
46 not fit on the current screen.
48 never displays lines in this fashion.
51 is a modeful editor, i.e. it has two modes,
58 first starts, it is in command mode.
59 There are several commands that change
63 @LI{<escape>}character is used to resolve the text input into the file,
64 and exit back into command mode.
67 command mode, the cursor is always positioned on the last column of
68 characters which take up more than one column on the screen.
71 text insert mode, the cursor is positioned on the first column of
72 characters which take up more than one column on the screen.
74 When positioning the cursor to a new line and column,
75 the type of movement is defined by the distance to the new cursor position.
76 If the new position is close,
77 the screen is scrolled to the new location.
78 If the new position is far away,
79 the screen is repainted so that the new position is on the screen.
80 If the screen is scrolled,
81 it is moved a minimal amount,
82 and the cursor line will usually appear at the top or bottom of the screen.
83 If the screen is repainted,
84 the cursor line will appear in the center of the screen,
85 unless the cursor is sufficiently close to the beginning or end of the file
86 that this isn't possible.
89 option is set, the screen may be scrolled or repainted in a horizontal
90 direction as well as in a vertical one.
92 A major difference between the historical
96 is in the scrolling and screen oriented position commands,
107 In historical implementations of
109 these commands acted on physical (as opposed to logical, or screen)
111 For lines that were sufficiently long in relation to the size of the
112 screen, this meant that single line scroll commands might repaint the
113 entire screen, scrolling or screen positioning commands might not change
114 the screen or move the cursor at all, and some lines simply could not
115 be displayed, even though
117 would edit the file that contained them.
120 these commands act on logical, i.e. screen lines.
121 You are unlikely to notice any difference unless you are editing files
122 with lines significantly longer than a screen width.
125 keeps track of the currently
128 Each command description (for commands that alter the current cursor
130 specifies if the cursor is set to a specific location in the line,
131 or if it is moved to the
132 @QQ{most attractive cursor position}.
133 The latter means that the cursor is moved to the cursor position that
134 is horizontally as close as possible to the current cursor position.
135 If the current line is shorter than the cursor position
137 would select, the cursor is positioned on the last character in the line.
138 (If the line is empty, the cursor is positioned on the first column
140 If a command moves the cursor to the most attractive position,
141 it does not alter the current cursor position, and a subsequent
142 movement will again attempt to move the cursor to that position.
143 Therefore, although a movement to a line shorter than the currently
144 most attractive position will cause the cursor to move to the end of
145 that line, a subsequent movement to a longer line will cause the
146 cursor to move back to the most attractive position.
150 command makes the end of each line the most attractive cursor position
151 rather than a specific column.
155 command described below notes where the cursor ends up after it is
157 This position is described in terms of characters on the line, i.e.
158 @QQ{the previous character},
160 @QQ{the last character in the line}.
161 This is to avoid needing to continually refer to on what part of the
162 character the cursor rests.
164 The following words have special meaning for
168 @cindex "previous context"
169 @IP{previous context}
171 The position of the cursor before the command which caused the
172 last absolute movement was executed.
175 command described in the next section that is considered an
176 absolute movement is so noted.
177 In addition, specifying
181 command is considered an absolute movement.
187 command can be used as an optional trailing argument to the
195 and (depending on the
200 This command indicates the end of the region of text that's affected by
202 The motion command may be either the command character repeated (in
203 which case it means the current line) or a cursor movement command.
204 In the latter case, the region affected by the command is from the
205 starting or stopping cursor position which comes first in the file,
206 to immediately before the starting or stopping cursor position which
207 comes later in the file.
208 Commands that operate on lines instead of using beginning and ending
209 cursor positions operate on all of the lines that are wholly or
210 partially in the region.
211 In addition, some other commands become line oriented depending on
212 where in the text they are used.
213 The command descriptions below note these special cases.
215 The following commands may all be used as motion components for
219 @multitable {@CO{<control-N>}} {@CO{'<character>}} {@CO{<control-J>}} {@CO{<control-M>}}
220 @item @CO{<control-A>} @tab @CO{<control-H>} @tab @CO{<control-J>} @tab @CO{<control-M>}
221 @item @CO{<control-N>} @tab @CO{<control-P>} @tab @CO{<space>} @tab @CO{$}
222 @item @CO{%} @tab @CO{'<character>} @tab @CO{(} @tab @CO{)}
223 @item @CO{+} @tab @CO{,} @tab @CO{-} @tab @CO{/}
224 @item @CO{0} @tab @CO{;} @tab @CO{?} @tab @CO{B}
225 @item @CO{E} @tab @CO{F} @tab @CO{G} @tab @CO{H}
226 @item @CO{L} @tab @CO{M} @tab @CO{N} @tab @CO{T}
227 @item @CO{W} @tab @CO{[[} @tab @CO{]]} @tab @CO{^}
228 @item @CO{_} @tab @CO{`<character>} @tab @CO{b} @tab @CO{e}
229 @item @CO{f} @tab @CO{h} @tab @CO{j} @tab @CO{k}
230 @item @CO{l} @tab @CO{n} @tab @CO{t} @tab @CO{w}
231 @item @strong{@{} @tab @CO{|} @tab @strong{@}}
234 The optional count prefix available for some of the
236 commands that take motion commands,
237 or the count prefix available for the
239 commands that are used as motion components,
240 may be included and is
242 considered part of the motion argument.
243 For example, the commands
247 are equivalent, and the region affected by the
249 command is two words of text.
251 if the optional count prefix is specified for both the
253 command and its motion component,
254 the effect is multiplicative and is considered part of the motion argument.
255 For example, the commands
259 are equivalent, and the region affected by the
261 command is four words of text.
265 A positive number used as an optional argument to most commands,
266 either to give a size or a position (for display or movement commands),
267 or as a repeat count (for commands that modify text).
268 The count argument is always optional and defaults to 1 unless otherwise
269 noted in the command description.
273 command synopsis shows both a
276 they may be presented in any order.
280 Generally, in languages where it is applicable,
282 recognizes two kinds of words.
283 First, a sequence of letters, digits and underscores,
284 delimited at both ends by:
285 characters other than letters, digits, or underscores,
286 the beginning or end of a line, and the beginning or end of the file.
287 Second, a sequence of characters other than letters, digits, underscores,
288 or whitespace characters, delimited at both ends by: a letter, digit,
289 underscore, or whitespace character,
290 the beginning or end of a line, and the beginning or end of the file.
291 For example, the characters
299 Groups of empty lines (or lines containing only whitespace characters)
300 are treated as a single word.
304 A set of non-whitespace characters preceded and followed by whitespace
305 characters or the beginning or end of the file or line.
306 For example, the characters
311 Groups of empty lines (or lines containing only whitespace characters)
312 are treated as a single bigword.
316 An area of text that begins with either the beginning of a file,
317 an empty line, or a section boundary, and continues until either
318 an empty line, section boundary, or the end of the file.
320 Groups of empty lines (or lines containing only whitespace characters)
321 are treated as a single paragraph.
323 Additional paragraph boundaries can be defined using the
329 An area of text that starts with the beginning of the file or a line
330 whose first character is an open brace
333 and continues until the next section or the end of the file.
335 Additional section boundaries can be defined using the
341 An area of text that begins with either the beginning of the file or the
342 first nonblank character following the previous sentence, paragraph, or
343 section boundary and continues until the end of the file or a period
350 followed by either an end-of-line or two whitespace characters.
351 Any number of closing parentheses
359 characters can appear between the period, exclamation point,
360 or question mark and the whitespace characters or end-of-line.
362 Groups of empty lines (or lines containing only whitespace characters)
363 are treated as a single sentence.
367 The following section describes the commands available in the command
371 In each entry below, the tag line is a usage synopsis for the command
373 In addition, the final line and column the cursor rests upon,
374 and any options which affect the command are noted.
377 @deftypefn Command {[count]} {<control-A>}
380 @LI{count}times for the current word.
381 The current word begins at the first non-whitespace character on or
382 after the current cursor position,
383 and extends up to the next non-word character or the end of the line.
384 The search is literal, i.e. no characters in the word have any special
385 meaning in terms of Regular Expressions.
386 It is an error if no matching pattern is found between the starting position
387 and the end of the file.
391 command is an absolute movement.
394 command may be used as the motion component of other
396 commands, in which case any text copied into a buffer is
400 Set to the line where the word is found.
402 Set to the first character of the word.
412 @deftypefn Command {[count]} {<control-B>}
416 Two lines of overlap are maintained, if possible,
417 by displaying the window starting at line
418 @LI{(top_line - count * window_size) + 2},
420 @LI{window_size}is the value of the
423 (In the case of split screens, this size is corrected to the
424 current screen size.)
425 It is an error if the movement is past the beginning of the file.
428 Set to the last line of text displayed on the screen.
430 Set to the first nonblank character of the line.
438 @deftypefn Command {[count]} {<control-D>}
443 @LI{count}is not specified, scroll forward the number of lines specified by the last
453 scroll forward half the number of lines in the screen.
454 (In the case of split screens, the default scrolling distance is
455 corrected to half the current screen size.)
456 It is an error if the movement is past the end of the file.
459 Set to the current line plus the number of lines scrolled.
461 Set to the first nonblank character of the line.
467 @deftypefn Command {[count]} {<control-E>}
470 @LI{count}lines, leaving the cursor on the current line and column, if possible.
471 It is an error if the movement is past the end of the file.
474 Unchanged unless the current line scrolls off the screen,
475 in which case it is set to the first line on the screen.
477 Unchanged unless the current line scrolls off the screen,
478 in which case it is set to the most attractive cursor position.
484 @deftypefn Command {[count]} {<control-F>}
488 Two lines of overlap are maintained, if possible,
489 by displaying the window starting at line
490 @LI{top_line + count * window_size - 2},
492 @LI{window_size}is the value of the
495 (In the case of split screens, this size is corrected to the
496 current screen size.)
497 It is an error if the movement is past the end of the file.
500 Set to the first line on the screen.
502 Set to the first nonblank character of the current line.
510 @deftypefn Command {} {<control-G>}
512 Display the file information.
513 The information includes the current pathname, the current line,
514 the number of total lines in the file, the current line as a percentage
515 of the total lines in the file, if the file has been modified,
516 was able to be locked, if the file's name has been changed,
517 and if the edit session is read-only.
529 @deftypefn Command {[count]} {<control-H>}
530 @deftypefnx Command {[count]} {h}
532 @LI{count}characters in the current line.
533 It is an error if the cursor is on the first character in the line.
539 commands may be used as the motion component of other
542 in which case any text copied into a buffer is character oriented.
548 @LI{current - count}character, or, the first character in the line if
549 @LI{count}is greater than or equal to the number of characters in the line
557 @deftypefn Command {[count]} {<control-J>}
560 @deftypefnx Command {[count]} {<control-N>}
562 @deftypefnx Command {[count]} {j}
564 @LI{count}lines without changing the current column.
565 It is an error if the movement is past the end of the file.
572 commands may be used as the motion component of other
574 commands, in which case any text copied into a buffer is
578 Set to the current line plus
581 The most attractive cursor position.
587 @deftypefn Command {} {<control-L>}
590 @deftypefnx Command {} {<control-R>}
602 @deftypefn Command {[count]} {<control-M>}
605 @deftypefnx Command {[count]} {+}
607 @LI{count}lines to the first nonblank character of that line.
608 It is an error if the movement is past the end of the file.
614 commands may be used as the motion component of other
616 commands, in which case any text copied into a buffer is
620 Set to the current line plus
623 Set to the first nonblank character in the line.
629 @deftypefn Command {[count]} {<control-P>}
632 @deftypefnx Command {[count]} {k}
634 @LI{count}lines, without changing the current column.
635 It is an error if the movement is past the beginning of the file.
641 commands may be used as the motion component of other
643 commands, in which case any text copied into a buffer is
647 Set to the current line minus
650 The most attractive cursor position.
656 @deftypefn Command {} {<control-T>}
658 Return to the most recent tag context.
661 command is an absolute movement.
664 Set to the context of the previous tag command.
666 Set to the context of the previous tag command.
672 @deftypefn Command {[count]} {<control-U>}
677 @LI{count}is not specified, scroll backward the number of lines specified by the
688 scroll backward half the number of lines in the screen.
689 (In the case of split screens, the default scrolling distance is
690 corrected to half the current screen size.)
691 It is an error if the movement is past the beginning of the file.
694 Set to the current line minus the amount scrolled.
696 Set to the first nonblank character in the line.
702 @deftypefn Command {} {<control-W>}
704 Switch to the next lower screen in the window, or, to the first
705 screen if there are no lower screens in the window.
708 Set to the previous cursor position in the window.
710 Set to the previous cursor position in the window.
716 @deftypefn Command {[count]} {<control-Y>}
719 @LI{count}lines, leaving the current line and column as is, if possible.
720 It is an error if the movement is past the beginning of the file.
723 Unchanged unless the current line scrolls off the screen,
724 in which case it is set to the last line of text displayed
727 Unchanged unless the current line scrolls off the screen,
728 in which case it is the most attractive cursor position.
734 @deftypefn Command {} {<control-Z>}
736 Suspend the current editor session.
737 If the file has been modified since it was last completely written,
740 option is set, the file is written before the editor session is
742 If this write fails, the editor session is not suspended.
755 @deftypefn Command {} {<escape>}
759 commands or cancel partial commands.
762 command is being entered (e.g.
768 the command is executed.
769 If a partial command has been entered, e.g.
773 the command is cancelled.
774 Otherwise, it is an error.
779 command is being executed, the current line is set as described for
781 Otherwise, unchanged.
785 command is being executed, the current column is set as described for
787 Otherwise, unchanged.
793 @deftypefn Command {} {<control-]>}
795 Push a tag reference onto the tag stack.
796 The tags files (see the
798 option for more information) are searched for a tag matching the
800 The current word begins at the first non-whitespace character on or
801 after the current cursor position,
802 and extends up to the next non-word character or the end of the line.
803 If a matching tag is found, the current file is discarded and the
804 file containing the tag reference is edited.
806 If the current file has been modified since it was last completely
807 written, the command will fail.
810 command is an absolute movement.
813 Set to the line containing the matching tag string.
815 Set to the start of the matching tag string.
825 @deftypefn Command {} {<control-^>}
827 Switch to the most recently edited file.
829 If the file has been modified since it was last completely written,
832 option is set, the file is written out.
833 If this write fails, the command will fail.
834 Otherwise, if the current file has been modified since it was last
835 completely written, the command will fail.
838 Set to the line the cursor was on when the file was last edited.
840 Set to the column the cursor was on when the file was last edited.
848 @deftypefn Command {[count]} {<space>}
851 @deftypefnx Command {[count]} {l}
852 Move the cursor forward
853 @LI{count}characters without changing the current line.
854 It is an error if the cursor is on the last character in the line.
860 commands may be used as the motion component of other
862 commands, in which case any text copied into a buffer is
864 In addition, these commands may be used as the motion components
865 of other commands when the cursor is on the last character in the
871 Set to the current character plus the next
872 @LI{count}characters, or to the last character on the line if
873 @LI{count}is greater than the number of characters in the line after the
880 @deftypefn Command {[count]} {!} {motion shell-argument(s)<carriage-return>}
882 Replace text with results from a shell command.
883 Pass the lines specified by the
885 @LI{motion}arguments as standard input to the program named by the
887 option, and replace those lines with the output (both
888 standard error and standard output) of that command.
890 After the motion is entered,
892 prompts for arguments to the shell command.
894 Within those arguments,
898 characters are expanded to the current and alternate pathnames,
902 character is expanded with the command text of the previous
907 (Therefore, the command
912 The special meanings of
917 can be overridden by escaping them with a backslash.
922 command has yet been executed,
923 it is an error to use an unescaped
925 character as a shell argument.
930 do shell expansion on the strings provided as arguments.
931 If any of the above expansions change the arguments the user entered,
932 the command is redisplayed at the bottom of the screen.
935 then executes the program named by the
939 flag followed by the arguments (which are bundled into a single argument).
943 command is permitted in an empty file.
945 If the file has been modified since it was last completely written,
948 command will warn you.
951 The first line of the replaced text.
953 The first column of the replaced text.
961 @deftypefn Command {[count]} {#} {#|+|-}
963 Increment or decrement the number referenced by the cursor.
964 If the trailing character is a
967 the number is incremented by
969 If the trailing character is a
971 the number is decremented by
978 causes the number to be interpreted as a hexadecimal number.
981 causes the number to be interpreted as an octal number, unless a non-octal
982 digit is found as part of the number.
983 Otherwise, the number is interpreted as a decimal number, and may
987 The current number begins at the first non-blank character at or after
988 the current cursor position, and extends up to the end of the line or
989 the first character that isn't a possible character for the numeric type.
990 The format of the number (e.g. leading 0's, signs) is retained unless
991 the new value cannot be represented in the previous format.
993 Octal and hexadecimal numbers, and the result of the operation, must fit
996 Similarly, decimal numbers and their result must fit into a
998 It is an error to use this command when the cursor is not positioned at
1005 Set to the first character in the cursor number.
1011 @deftypefn Command {[count]} {$}
1013 Move the cursor to the end of a line.
1015 @LI{count}is specified, the cursor moves down
1016 @LI{count - 1}lines.
1018 It is not an error to use the
1020 command when the cursor is on the last character in the line or
1021 when the line is empty.
1025 command may be used as the motion component of other
1027 commands, in which case any text copied into a buffer is
1028 character oriented, unless the cursor is at, or before the first
1029 nonblank character in the line, in which case it is line oriented.
1030 It is not an error to use the
1032 command as a motion component when the cursor is on the last character
1033 in the line, although it is an error when the line is empty.
1036 Set to the current line plus
1039 Set to the last character in the line.
1045 @deftypefn Command {} {%}
1047 Move to the matching character.
1048 The cursor moves to the bracket character which
1050 the bracket found at the current cursor position
1051 or which is the closest one to the right of the cursor on the line.
1052 The bracket characters are defined by the
1055 An error will be reported if none of the
1057 characters is found, or if no matching character is found.
1058 If the open and close brackes are identical (e.g.: if they are
1064 command will perform a backwards search from the original opening bracket.
1066 @LI{count}specified to the
1068 command was ignored.
1072 command is an absolute movement.
1075 command may be used as the motion component of other
1077 commands, in which case any text copied into a buffer is
1078 character oriented, unless the starting point of the region is at
1079 or before the first nonblank character on its line, and the ending
1080 point is at or after the last nonblank character on its line, in
1081 which case it is line oriented.
1084 Set to the line containing the matching character.
1086 Set to the matching character.
1092 @deftypefn Command {} {&}
1094 Repeat the previous substitution command on the current line.
1097 @LI{count}specified to the
1099 command was ignored.
1104 Unchanged if the cursor was on the last character in the line,
1105 otherwise, set to the first nonblank character in the line.
1116 @cindex SQUOTE<character>
1117 @deftypefn Command {} {'<character>}
1119 @cindex `<character>
1120 @deftypefnx Command {} `<character>
1121 Return to a context marked by the character
1124 @LI{<character>}is the
1128 character, return to the previous context.
1130 @LI{<character>}is any other character,
1131 return to the context marked by that character (see the
1133 command for more information).
1134 If the command is the
1136 command, only the line value is restored,
1137 and the cursor is placed on the first nonblank character of that line.
1138 If the command is the
1140 command, both the line and column values are restored.
1142 It is an error if the context no longer exists because of
1144 (Contexts follow lines that are moved, or which are deleted
1151 commands are both absolute movements.
1152 They may be used as a motion component for other
1157 command, any text copied into a buffer is line oriented.
1161 any text copied into a buffer is character oriented,
1162 unless it both starts and stops at the first character in the line,
1163 in which case it is line oriented.
1164 In addition, when using the
1166 command as a motion component,
1167 commands which move backward and started at the first character in the line,
1168 or move forward and ended at the first character in the line,
1169 are corrected to the last character of the line preceding the starting and
1170 ending lines, respectively.
1173 Set to the line from the context.
1175 Set to the first nonblank character in the line, for the
1177 command, and set to the context's column for the
1185 @deftypefn Command {} {[count] (}
1188 @LI{count}sentences.
1192 command is an absolute movement.
1195 command may be used as the motion component of other
1198 in which case any text copied into a buffer is character oriented,
1199 unless the starting and stopping points of the region are the first
1200 character in the line,
1201 in which case it is line oriented.
1202 If it is line oriented,
1203 the starting point of the region is adjusted to be the end of the line
1204 immediately before the starting cursor position.
1207 Set to the line containing the beginning of the sentence.
1209 Set to the first nonblank character of the sentence.
1217 @deftypefn Command {[count]} {)}
1220 @LI{count}sentences.
1224 command is an absolute movement.
1227 command may be used as the motion component of other
1229 commands, in which case any text copied into a buffer is
1230 character oriented, unless the starting point of the region is the
1231 first character in the line, in which case it is line oriented.
1232 In the latter case, if the stopping point of the region is also
1233 the first character in the line, it is adjusted to be the end of the
1234 line immediately before it.
1237 Set to the line containing the beginning of the sentence.
1239 Set to the first nonblank character of the sentence.
1247 @deftypefn Command {[count]} {,}
1249 Reverse find character
1257 command, searching the other way in the line,
1265 command has not been performed yet.
1269 command may be used as the motion component of other
1271 commands, in which case any text copied into a buffer is
1277 Set to the searched-for character for the
1282 before the character for the
1285 and after the character for the
1293 @deftypefn Command {[count]} {-}
1295 Move to the first nonblank of the previous line,
1298 It is an error if the movement is past the beginning of the file.
1302 command may be used as the motion component of other
1304 commands, in which case any text copied into a buffer is
1308 Set to the current line minus
1311 Set to the first nonblank character in the line.
1317 @deftypefn Command {[count]} {.}
1321 command that modified text.
1322 The repeated command may be a command and motion component combination.
1324 @LI{count}is specified, it replaces
1326 the count specified for the repeated command, and, if applicable, for
1327 the repeated motion component.
1329 @LI{count}is not specified, the counts originally specified to the command being
1330 repeated are used again.
1332 As a special case, if the
1334 command is executed immediately after the
1336 command, the change log is rolled forward or backward, depending on
1342 Set as described for the repeated command.
1344 Set as described for the repeated command.
1350 @deftypefn Command {} {/RE<carriage-return>}
1352 @deftypefnx Command {} {/RE/} {[offset]<carriage-return>}
1354 @deftypefnx Command {} {?RE<carriage-return>}
1355 @deftypefnx Command {} {?RE?} {[offset]<carriage-return>}
1357 @deftypefnx Command {} N
1359 @deftypefnx Command {} n
1360 Search forward or backward for a regular expression.
1361 The commands beginning with a slash
1363 character are forward searches, the commands beginning with a
1366 are backward searches.
1368 prompts with the leading character on the last line of the screen
1370 It then searches forward or backward in the file for the next
1371 occurrence of the string, which is interpreted as a Basic Regular
1378 commands are absolute movements.
1379 They may be used as the motion components of other
1381 commands, in which case any text copied into a buffer is
1382 character oriented, unless the search started and ended on
1383 the first column of a line, in which case it is line oriented.
1384 In addition, forward searches ending at the first character of a line,
1385 and backward searches beginning at the first character in the line,
1386 are corrected to begin or end at the last character of the previous line.
1387 (Note, forward and backward searches can occur for both
1395 If an offset from the matched line is specified (i.e. a trailing
1399 character is followed by a signed offset), the buffer will always
1400 be line oriented (e.g.
1402 will always guarantee a line orientation).
1406 command repeats the previous search, but in the reverse direction.
1409 command repeats the previous search.
1414 commands are used as motion components for the
1416 command, you will not be prompted for the text of the bang command,
1417 instead the previous bang command will be executed.
1420 @QT{//<carriage-return>},
1421 @QT{/<carriage-return>},
1422 @QT{??<carriage-return>},
1424 @QT{?<carriage-return>}
1425 search for the last search RE, in the indicated direction.
1427 Searches may be interrupted using the
1428 @LI{<interrupt>}character.
1430 Multiple search patterns may be grouped together by delimiting
1431 them with semicolons and zero or more whitespace characters, e.g.
1432 @LI{/foo/ ; ?bar?}searches forward for
1433 @LI{foo}and then, from that location, backwards for
1435 When search patterns are grouped together in this manner,
1436 the search patterns are evaluated left to right with the
1437 final cursor position determined by the last search pattern.
1439 It is also permissible to append a
1441 command to the search strings, e.g.
1442 @LI{/foo/ z.}searches forward for the next occurrence of
1444 and then positions that line in the middle of screen.
1447 Set to the line in which the match occurred.
1449 Set to the first character of the matched string.
1462 @deftypefn Command {} {0}
1464 Move to the first character in the current line.
1465 It is not an error to use the
1467 command when the cursor is on the first character in the line,
1471 command may be used as the motion component of other
1474 in which case it is an error if the cursor is on the first character
1476 and any text copied into a buffer is character oriented.
1481 Set to the first character in the line.
1487 @deftypefn Command {} {:}
1495 command on the last line of the screen, using a colon
1498 The command is terminated by a
1499 @LI{<carriage-return>},
1501 @LI{<escape>}character; all of these characters may be escaped by using a
1502 @LI{<literal-next>}character.
1503 The command is then executed.
1507 command writes to the screen,
1509 will prompt the user for a
1510 @LI{<carriage-return>}before continuing
1514 Large amounts of output from the
1516 command will be paged for the user, and the user prompted for a
1517 @LI{<carriage-return>}or
1518 @LI{<space>}key to continue.
1519 In some cases, a quit (normally a
1522 @LI{<interrupt>}may be entered to interrupt the
1528 command finishes, and the user is prompted to resume visual mode,
1529 it is also possible to enter another
1531 character followed by another
1536 The current line is set as described for the
1540 The current column is set as described for the
1544 Affected as described for the
1550 @deftypefn Command {[count]} {;}
1552 Repeat the last character find
1554 The last character find is one of the
1567 command has not been performed yet.
1571 command may be used as the motion component of other
1573 commands, in which case any text copied into a buffer is
1579 Set to the searched-for character for the
1584 before the character for the
1587 and after the character for the
1595 @deftypefn Command {[count]} {< motion}
1598 @deftypefnx Command {[count]} {>} {motion}
1599 Shift lines left or right.
1600 Shift the number of lines in the region specified by the
1602 @LI{motion}left (for the
1604 command) or right (for the
1606 command) by the number of columns specified by the
1609 Only whitespace characters are deleted when shifting left.
1610 Once the first character in the line no longer contains a whitespace
1611 character, the command will succeed,
1612 but the line will not be modified.
1617 Set to the first nonblank character in the line.
1625 @deftypefn Command {} {@@} {buffer}
1627 Execute a named buffer.
1628 Execute the named buffer as
1631 The buffer may include
1633 commands, too, but they must be expressed as a
1636 If the buffer is line oriented,
1637 @LI{<newline>}characters are logically appended to each line of the buffer.
1638 If the buffer is character oriented,
1639 @LI{<newline>}characters are logically appended to all but the last line in the buffer.
1641 If the buffer name is
1645 then the last buffer executed shall be used.
1646 It is an error to specify
1650 if there were no previous buffer executions.
1651 The text of a buffer may contain a
1654 and it is possible to create infinite loops in this manner.
1656 @LI{<interrupt>}character may be used to interrupt the loop.)
1659 The current line is set as described for the command(s).
1661 The current column is set as described for the command(s).
1667 @deftypefn Command {[count]} {A}
1669 Enter input mode, appending the text after the end of the line.
1671 @LI{count}is specified, the text is repeatedly input
1672 @LI{count - 1}more times after input mode is exited.
1675 Set to the last line upon which characters were entered.
1677 Set to the last character entered.
1691 @deftypefn Command {[count]} {B}
1695 Move the cursor backward to the beginning of a bigword by repeating the
1696 following algorithm: if the current position is at the beginning of a
1697 bigword or the character at the current position cannot be part of a bigword,
1698 move to the first character of the preceding bigword.
1699 Otherwise, move to the first character of the bigword at the current position.
1700 If no preceding bigword exists on the current line, move to the first
1701 character of the last bigword on the first preceding line that contains a
1706 command may be used as the motion component of other
1708 commands, in which case any text copied into a buffer is
1712 Set to the line containing the word selected.
1714 Set to the first character of the word selected.
1720 @deftypefn Command {[buffer]} {[count] C}
1722 Change text from the current position to the end-of-line.
1724 @LI{count}is specified, the input text replaces from the current position to
1725 the end-of-line, plus
1726 @LI{count - 1}subsequent lines.
1729 Set to the last line upon which characters were entered.
1731 Set to the last character entered.
1745 @deftypefn Command {[buffer]} {D}
1747 Delete text from the current position to the end-of-line.
1749 It is not an error to execute the
1751 command on an empty line.
1756 Set to the character before the current character, or, column 1 if
1757 the cursor was on column 1.
1763 @deftypefn Command {[count]} {E}
1766 @LI{count}end-of-bigwords.
1767 Move the cursor forward to the end of a bigword by repeating the
1768 following algorithm: if the current position is the end of a
1769 bigword or the character at that position cannot be part of a bigword,
1770 move to the last character of the following bigword.
1771 Otherwise, move to the last character of the bigword at the current
1773 If no succeeding bigword exists on the current line,
1774 move to the last character of the first bigword on the next following
1775 line that contains a bigword.
1779 command may be used as the motion component of other
1781 commands, in which case any text copied into a buffer is
1785 Set to the line containing the word selected.
1787 Set to the last character of the word selected.
1793 @deftypefn Command {[count]} {F} {<character>}
1796 @LI{count}times backward through the current line for
1801 command may be used as the motion component of other
1803 commands, in which case any text copied into a buffer is
1809 Set to the searched-for character.
1815 @deftypefn Command {[count]} {G}
1819 or the last line of the file if
1820 @LI{count}not specified.
1824 command is an absolute movement.
1827 command may be used as the motion component of other
1829 commands, in which case any text copied into a buffer is
1835 if specified, otherwise, the last line.
1837 Set to the first nonblank character in the line.
1843 @deftypefn Command {[count]} {H}
1845 Move to the screen line
1846 @LI{count - 1}lines below the top of the screen.
1850 command is an absolute movement.
1853 command may be used as the motion component of other
1855 commands, in which case any text copied into a buffer is
1860 @LI{count - 1}lines below the top of the screen.
1862 Set to the first nonblank character of the
1870 @deftypefn Command {[count]} {I}
1872 Enter input mode, inserting the text at the beginning of the line.
1874 @LI{count}is specified, the text input is repeatedly input
1875 @LI{count - 1}more times.
1878 Set to the last line upon which characters were entered.
1880 Set to the last character entered.
1886 @deftypefn Command {[count]} {J}
1890 @LI{count}is specified,
1891 @LI{count}lines are joined; a minimum of two lines are always joined,
1892 regardless of the value of
1895 If the current line ends with a whitespace character, all whitespace
1896 is stripped from the next line.
1897 Otherwise, if the next line starts with a open parenthesis
1900 Otherwise, if the current line ends with a question mark
1904 or exclamation point
1907 Otherwise, insert a single space.
1909 It is not an error to join lines past the end of the file,
1910 i.e. lines that do not exist.
1915 Set to the character after the last character of the next-to-last
1922 @deftypefn Command {[count]} {L}
1924 Move to the screen line
1925 @LI{count - 1}lines above the bottom of the screen.
1929 command is an absolute movement.
1932 command may be used as the motion component of other
1934 commands, in which case any text copied into a buffer is
1939 @LI{count - 1}lines above the bottom of the screen.
1941 Set to the first nonblank character of the
1949 @deftypefn Command {} {M}
1951 Move to the screen line in the middle of the screen.
1955 command is an absolute movement.
1958 command may be used as the motion component of other
1960 commands, in which case any text copied into a buffer is
1964 @LI{count}specified to the
1966 command was ignored.
1969 Set to the line in the middle of the screen.
1971 Set to the first nonblank character of the
1979 @deftypefn Command {[count]} {O}
1981 Enter input mode, appending text in a new line above the current line.
1983 @LI{count}is specified, the text input is repeatedly input
1984 @LI{count - 1}more times.
1987 @LI{count}specified to the
1989 command was ignored.
1992 Set to the last line upon which characters were entered.
1994 Set to the last character entered.
2008 @deftypefn Command {[buffer]} {P}
2010 Insert text from a buffer.
2011 Text from the buffer (the unnamed buffer by default) is inserted
2012 before the current column or, if the buffer is line oriented,
2013 before the current line.
2016 Set to the lowest numbered line insert,
2017 if the buffer is line oriented, otherwise unchanged.
2019 Set to the first nonblank character of the appended text,
2020 if the buffer is line oriented, otherwise, the last character
2021 of the appended text.
2027 @deftypefn Command {} {Q}
2031 (or visual) mode and switch to
2044 @deftypefn Command {[count]} {R}
2046 Enter input mode, replacing the characters in the current line.
2048 @LI{count}is specified, the text input is repeatedly input
2049 @LI{count - 1}more times.
2051 If the end of the current line is reached, no more characters are
2052 replaced and any further characters input are appended to the line.
2055 Set to the last line upon which characters were entered.
2057 Set to the last character entered.
2071 @deftypefn Command {[buffer] [count]} {S}
2077 Set to the last line upon which characters were entered.
2079 Set to the last character entered.
2093 @deftypefn Command {[count]} {T} {<character>}
2097 through the current line for the character
2104 command may be used as the motion component of other
2106 commands, in which case any text copied into a buffer is
2112 Set to the character
2114 the searched-for character.
2120 @deftypefn Command {} {U}
2122 Restore the current line to its state before the cursor last
2128 The first character in the line.
2134 @deftypefn Command {[count]} {W}
2138 Move the cursor forward to the beginning of a bigword by repeating the
2139 following algorithm: if the current position is within a bigword or the
2140 character at that position cannot be part of a bigword, move to the first
2141 character of the next bigword.
2142 If no subsequent bigword exists on the current line,
2143 move to the first character of the first bigword on the first following
2144 line that contains a bigword.
2148 command may be used as the motion component of other
2150 commands, in which case any text copied into a buffer is
2154 The line containing the word selected.
2156 The first character of the word selected.
2162 @deftypefn Command {[buffer] [count]} {X}
2165 @LI{count}characters before the cursor.
2166 If the number of characters to be deleted is greater than or equal to
2167 the number of characters to the beginning of the line, all of the
2168 characters before the current cursor position, to the beginning of the
2174 Set to the current character minus
2176 or the first character if count is greater than the number of
2177 characters in the line before the cursor.
2183 @deftypefn Command {[buffer] [count]} {Y}
2187 @LI{count}lines into the specified buffer.
2198 @deftypefn Command {} {ZZ}
2200 Write the file and exit
2202 The file is only written if it has been modified since the last
2203 complete write of the file to any file.
2207 command will exit the editor after writing the file,
2208 if there are no further files to edit.
2217 in a row will override this check and the editor will exit,
2218 ignoring any files that have not yet been edited.
2229 @deftypefn Command {[count]} {[[}
2232 @LI{count}section boundaries.
2236 command is an absolute movement.
2239 command may be used as the motion component of other
2241 commands, in which case any text copied into a buffer is
2242 character oriented, unless the starting position is column 0,
2243 in which case it is line oriented.
2245 It is an error if the movement is past the beginning of the file.
2248 Set to the previous line that is
2249 @LI{count}section boundaries back,
2250 or the first line of the file if no more section boundaries exist
2251 preceding the current line.
2253 Set to the first nonblank character in the line.
2261 @deftypefn Command {[count]} {]]}
2264 @LI{count}section boundaries.
2268 command is an absolute movement.
2271 command may be used as the motion component of other
2273 commands, in which case any text copied into a buffer is
2274 character oriented, unless the starting position is column 0,
2275 in which case it is line oriented.
2277 It is an error if the movement is past the end of the file.
2280 Set to the line that is
2281 @LI{count}section boundaries forward,
2282 or to the last line of the file if no more section
2283 boundaries exist following the current line.
2285 Set to the first nonblank character in the line.
2293 @deftypefn Command {} {^}
2295 Move to first nonblank character on the current line.
2299 command may be used as the motion component of other
2301 commands, in which case any text copied into a buffer is
2307 Set to the first nonblank character of the current line.
2313 @deftypefn Command {[count]} {_}
2316 @LI{count - 1}lines, to the first nonblank character.
2319 command may be used as the motion component of other
2321 commands, in which case any text copied into a buffer is
2324 It is not an error to execute the
2326 command when the cursor is on the first character in the line.
2329 The current line plus
2332 The first nonblank character in the line.
2338 @deftypefn Command {[count]} {a}
2340 Enter input mode, appending the text after the cursor.
2342 @LI{count}is specified, the text input is repeatedly input
2343 @LI{count - 1}more times.
2346 Set to the last line upon which characters were entered.
2348 Set to the last character entered.
2362 @deftypefn Command {[count]} {b}
2366 Move the cursor backward to the beginning of a word by repeating the
2367 following algorithm: if the current position is at the beginning of a word,
2368 move to the first character of the preceding word.
2369 Otherwise, the current position moves to the first character of the word
2370 at the current position.
2371 If no preceding word exists on the current line, move to the first
2372 character of the last word on the first preceding line that contains
2377 command may be used as the motion component of other
2379 commands, in which case any text copied into a buffer is
2383 Set to the line containing the word selected.
2385 Set to the first character of the word selected.
2391 @deftypefn Command {[buffer] [count]} {c} {motion}
2393 Change the region of text specified by the
2396 If only part of a single line is affected, then the last character
2397 being changed is marked with a
2399 Otherwise, the region of text is deleted, and input mode is entered.
2402 Set to the last line upon which characters were entered.
2404 Set to the last character entered.
2418 @deftypefn Command {[buffer] [count]} {d} {motion}
2420 Delete the region of text specified by the
2425 Set to the line where the region starts.
2427 Set to the first character in the line after the last character in the
2429 If no such character exists, set to the last character before the region.
2435 @deftypefn Command {[count]} {e}
2438 @LI{count}end-of-words.
2439 Move the cursor forward to the end of a word by repeating the following
2440 algorithm: if the current position is the end of a word,
2441 move to the last character of the following word.
2442 Otherwise, move to the last character of the word at the current position.
2443 If no succeeding word exists on the current line, move to the last character
2444 of the first word on the next following line that contains a word.
2448 command may be used as the motion component of other
2450 commands, in which case any text copied into a buffer is
2454 Set to the line containing the word selected.
2456 Set to the last character of the word selected.
2462 @deftypefn Command {[count]} {f} {<character>}
2465 @LI{count}times, through the rest of the current line for
2470 command may be used as the motion component of other
2472 commands, in which case any text copied into a buffer is
2478 Set to the searched-for character.
2484 @deftypefn Command {[count]} {i}
2486 Enter input mode, inserting the text before the cursor.
2488 @LI{count}is specified, the text input is repeatedly input
2489 @LI{count - 1}more times.
2492 Set to the last line upon which characters were entered.
2494 Set to the last character entered.
2508 @deftypefn Command {} {m} {<character>}
2510 Save the current context (line and column) as
2512 The exact position is referred to by
2514 The line is referred to by
2518 @LI{<character>}was restricted to lower-case letters.
2520 permits the use of any character.
2531 @deftypefn Command {[count]} {o}
2533 Enter input mode, appending text in a new line under the current line.
2535 @LI{count}is specified, the text input is repeatedly input
2536 @LI{count - 1}more times.
2539 @LI{count}specified to the
2541 command was ignored.
2544 Set to the last line upon which characters were entered.
2546 Set to the last character entered.
2560 @deftypefn Command {[buffer]} {p}
2562 Append text from a buffer.
2563 Text from the buffer (the unnamed buffer by default) is appended
2564 after the current column or, if the buffer is line oriented,
2565 after the current line.
2568 Set to the first line appended, if the buffer is line oriented,
2569 otherwise unchanged.
2571 Set to the first nonblank character of the appended text if the buffer
2572 is line oriented, otherwise, the last character of the appended text.
2578 @deftypefn Command {[count]} {r} {<character>}
2582 @LI{count}characters in the line are replaced with
2584 Replacing characters with
2585 @LI{<newline>}characters results in creating new, empty lines into the file.
2590 the command is cancelled.
2593 Unchanged unless the replacement character is a
2595 in which case it is set to the current line plus
2598 Set to the last character replaced,
2599 unless the replacement character is a
2601 in which case the cursor is in column 1 of the last line inserted.
2607 @deftypefn Command {[buffer] [count]} {s}
2610 @LI{count}characters in the current line starting with the current character.
2613 Set to the last line upon which characters were entered.
2615 Set to the last character entered.
2629 @deftypefn Command {[count]} {t} {<character>}
2632 @LI{count}times, through the current line for the character immediately
2638 command may be used as the motion component of other
2640 commands, in which case any text copied into a buffer is
2646 Set to the character
2648 the searched-for character.
2654 @deftypefn Command {} {u}
2656 Undo the last change made to the file.
2659 command alternates between these two states, and is its own inverse.
2660 When used after an insert that inserted text on more than one line,
2661 the lines are saved in the numeric buffers.
2665 command, when used immediately after the
2667 command, causes the change log to be rolled forward or backward,
2668 depending on the action of the
2673 Set to the position of the first line changed, if the reversal affects
2674 only one line or represents an addition or change; otherwise, the line
2675 preceding the deleted text.
2677 Set to the cursor position before the change was made.
2683 @deftypefn Command {[count]} {w}
2687 Move the cursor forward to the beginning of a word by repeating the
2688 following algorithm: if the current position is at the
2689 beginning of a word, move to the first character of the next word.
2690 If no subsequent word exists on the current line, move to the first
2691 character of the first word on the first following line that contains
2696 command may be used as the motion component of other
2698 commands, in which case any text copied into a buffer is
2702 Set to the line containing the word selected.
2704 Set to the first character of the word selected.
2710 @deftypefn Command {[buffer] [count]} {x}
2713 @LI{count}characters.
2714 The deletion is at the current character position.
2715 If the number of characters to be deleted is greater than or equal to
2716 the number of characters to the end of the line, all of the characters
2717 from the current cursor position to the end of the line are deleted.
2722 Unchanged unless the last character in the line is deleted and the cursor
2723 is not already on the first character in the line, in which case it is
2724 set to the previous character.
2730 @deftypefn Command {[buffer] [count]} y {motion}
2734 the text region specified by the
2740 Unchanged, unless the region covers more than a single line,
2741 in which case it is set to the line where the region starts.
2743 Unchanged, unless the region covers more than a single line,
2744 in which case it is set to the character were the region starts.
2750 @deftypefn Command {[count1]} {z} {[count2] type}
2752 Redraw the screen with a window
2753 @LI{count2}lines long, with line
2754 @LI{count1}placed as specified by the
2757 @LI{count1}is not specified, it defaults to the current line.
2759 @LI{count2}is not specified, it defaults to the current window size.
2762 @LI{type}characters may be used:
2766 @LI{count1}is specified, place the line
2767 @LI{count1}at the top of the screen.
2768 Otherwise, display the screen after the current screen, similarly to the
2771 @item <carriage-return>
2773 @LI{count1}at the top of the screen.
2776 @LI{count1}in the center of the screen.
2779 @LI{count1}at the bottom of the screen.
2782 @LI{count1}is specified, place the line that is at the top of the screen
2784 @LI{count1}is at the bottom of the screen, at the bottom of the screen,
2785 i.e. display the screen before the screen before
2787 Otherwise, display the screen before the current screen, similarly to the
2795 @LI{count1}is not specified and the
2796 @LI{type}character was either
2800 in which case it is set to the line before the first line on the
2801 previous screen or the line after the last line on the previous
2802 screen, respectively.
2804 Set to the first nonblank character in the line.
2810 @deftypefn Command {[count]} @{
2813 @LI{count}paragraphs.
2817 command is an absolute movement.
2820 command may be used as the motion component of other
2822 commands, in which case any text copied into a buffer is
2823 character oriented, unless the starting character is the first
2824 character on its line, in which case it is line oriented.
2827 Set to the line containing the beginning of the previous paragraph.
2829 Set to the first nonblank character in the line.
2837 @deftypefn Command {[count]} {|}
2841 position on the current line.
2845 command may be used as the motion component of other
2847 commands, in which case any text copied into a buffer is
2849 It is an error to use the
2851 command as a motion component and for the cursor not to move.
2856 Set to the character occupying the column position identified by
2858 if the position exists in the line.
2859 If the column length of the current line is less than
2861 the cursor is moved to the last character in the line.
2867 @deftypefn Command {[count]} @}
2870 @LI{count}paragraphs.
2874 command is an absolute movement.
2877 command may be used as the motion component of other
2879 commands, in which case any text copied into a buffer is
2880 character oriented, unless the starting character is at or
2881 before any nonblank characters in its line,
2882 in which case it is line oriented.
2885 Set to the line containing the beginning of the next paragraph.
2887 Set to the first nonblank character in the line.
2895 @deftypefn Command {[count]} {~}
2897 Reverse the case of the next
2898 @LI{count}character(s).
2899 This is the historic semantic for the
2901 command and it is only in effect if the
2905 Lowercase alphabetic characters are changed to uppercase,
2906 and uppercase characters are changed to lowercase.
2907 No other characters are affected.
2911 command did not take an associated count, nor did it move past the
2912 end of the current line.
2913 As it had no associated motion it was difficult to change the case
2914 of large blocks of text.
2917 if the cursor is on the last character of a line, and there are
2918 more lines in the file, the cursor moves to the next line.
2920 It is not an error to specify a count larger than the number of
2921 characters between the cursor and the end of the file.
2924 Set to the line of the character after
2925 @LI{count}characters, or, end of file.
2927 Set to the character after
2928 @LI{count}characters, or, end-of-file.
2936 @deftypefn Command {[count]} {~} {motion}
2938 Reverse the case of the characters in a text region specified by the
2941 Only in effect if the
2945 Lowercase characters are changed to uppercase,
2946 and uppercase characters are changed to lowercase.
2947 No other characters are affected.
2950 Set to the line of the character after the last character in the region.
2952 Set to the character after the last character in the region.
2960 @deftypefn Command {} {<interrupt>}
2962 Interrupt the current operation.
2963 Many of the potentially long-running
2965 commands may be interrupted using the terminal interrupt character.
2966 These operations include searches, file reading and writing, filter
2967 operations and map character expansion.
2968 Interrupts are also enabled when running commands outside of
2972 @LI{<interrupt>}character is used to interrupt while entering an
2974 command, the command is aborted, the cursor returns to its previous
2977 remains in command mode.
2980 @LI{<interrupt>}character is used to interrupt any
2981 operation, any changes made before the interrupt are left in place.
2984 Dependent on the operation being interrupted.
2986 Dependent on the operation being interrupted.
2991 @chapter Vi Text Input Commands
2993 The following section describes the commands available in the text
3000 implementations only permitted the characters inserted on the current
3002 In addition, only the
3003 @LI{<control-D>}erase character and the
3007 erase strings could erase autoindent characters.
3008 (Autoindent characters include both the characters inserted automatically
3009 at the beginning of an input line as well as characters inserted using the
3010 @LI{<control-T>}command.)
3011 This implementation permits erasure to continue past the beginning
3012 of the current line, and back to where text input mode was entered.
3013 In addition, autoindent characters may be erased using the standard
3015 For the line and word erase characters, reaching the autoindent
3018 boundary, denoting the end of the current word or line erase.
3019 Repeating the word or line erase key will erase the autoindent characters.
3025 @LI{<control-W>}as character and word erase characters, respectively, regardless of
3026 the current terminal settings.
3027 This implementation accepts, in addition to these two characters,
3028 the current terminal characters for those operations.
3030 @deftypefn Input {} {<nul>}
3032 If the first character of the input is a
3034 the previous input is replayed, as if just entered.
3037 @deftypefn Input {} {<control-D>}
3039 If the previous character on the line was an autoindent character,
3040 erase characters to move the cursor back to the column immediately
3041 after the previous (1-based) column which is a multiple of the
3044 This may result in any number of
3046 @LI{<space>}characters preceding the cursor being changed.
3050 option is set and the user is entering the first character in the line,
3051 @LI{<control-D>}is ignored.
3052 Otherwise, a literal
3053 @LI{<control-D>}character is entered.
3055 @cindex ^<control-D>
3056 @deftypefn Input {} {^<control-D>}
3058 If the previous character on the line was an autoindent character,
3059 erase all of the autoindent characters on the line.
3060 In addition, the autoindent level is reset to 0.
3062 @cindex 0<control-D>
3063 @deftypefn Input {} {0<control-D>}
3065 If the previous character on the line was an autoindent character,
3066 erase all of the autoindent characters on the line.
3067 The autoindent level is not altered.
3070 @deftypefn Input {} {<control-T>}
3074 @LI{<space>}characters to move the cursor forward to the column immediately
3075 after the next (1-based) column which is a multiple of the
3078 This may result in any number of
3080 @LI{<space>}characters preceding the cursor being changed.
3085 @LI{<control-T>}command to be used unless the cursor was at the first column of a new
3086 line or it was preceded only by autoindent characters.
3088 permits it to be used at any time during insert mode.
3091 @deftypefn Input {} {<erase>}
3094 @deftypefnx Input {} {<control-H>}
3095 Erase the last character.
3097 @cindex "<literal-next>"
3098 @deftypefn Input {} {<literal-next>}
3100 Quote the next character.
3101 The next character will not be mapped (see the
3103 command for more information)
3104 or interpreted specially.
3107 character will be displayed immediately as a placeholder,
3108 but will be replaced by the next character.
3111 @deftypefn Input {} {<escape>}
3113 If on the colon command line, and the
3115 edit option is set, behave as described for that option.
3116 Otherwise, if on the colon command line,
3117 execute the command.
3118 Otherwise, if not on the colon command line,
3119 resolve all text input into the file, and return to command mode.
3121 @cindex "<line erase>"
3122 @deftypefn Input {} {<line erase>}
3124 Erase the current line.
3126 @cindex "<control-W>"
3127 @deftypefn Input {} {<control-W>}
3129 @cindex "<word erase>"
3130 @deftypefnx Input {} {<word erase>}
3131 Erase the last word.
3132 The definition of word is dependent on the
3138 @cindex "<control-X>"
3139 @deftypefn Input {} {<control-X>[0-9A-Fa-f]+}
3141 Insert a character with the specified hexadecimal value into the text.
3142 The value is delimited by any non-hexadecimal character or the input
3143 of the maximum number of characters that can be translated into a single
3147 @deftypefn Input {} {<interrupt>}
3149 Interrupt text input mode, returning to command mode.
3151 @LI{<interrupt>}character is used to interrupt inserting text into the file,
3153 @LI{<escape>}character was used; all text input up to the interruption is
3154 resolved into the file.