1 @comment Copyright (c) 1994
2 @comment The Regents of the University of California. All rights reserved.
3 @comment Copyright (c) 1994, 1995, 1996
4 @comment Keith Bostic. All rights reserved.
6 @comment See the LICENSE file for redistribution information.
8 @comment $Id: ex.cmd.texi,v 8.1 2001/08/18 20:43:47 skimo Exp $ (Berkeley) $Date: 2001/08/18 20:43:47 $
10 @chapter Ex Description
12 The following words have special meanings for
16 @cindex "<end-of-file>"
19 The end-of-file character is used to scroll the screen in the
22 This character is normally
24 However, whatever character is set for the current terminal is supported
30 A single-line address, given in any of the forms described in the
34 @LI{line}is the current line.
38 A line, or a pair of line addresses, separated by a comma or semicolon.
39 (See the section entitled
41 for more information.)
42 The default for range is the current line
50 The starting address must be less than, or equal to, the ending address.
54 A positive integer, specifying the number of lines to be affected by
55 the command; the default is 1.
56 Generally, a count past the end-of-file may be specified, e.g. the
59 in a 10 line file is acceptable, and will print from the current line
60 through the last line in the file.
64 One or more of the characters
69 When a command that accepts these flags completes, the addressed line(s)
70 are written out as if by the corresponding
76 In addition, any number of
80 characters can be specified before, after, or during the flags, in which
81 case the line written is not necessarily the one affected by the command,
82 but rather the line addressed by the offset address specified.
88 A pattern used to derive a pathname; the default is the current file.
89 File names are subjected to normal
94 Anywhere a file name is specified, it is also possible to use
97 This will be replaced with a temporary file name which can be used
98 for temporary work, e.g.
100 creates and edits a new file.
102 If both a count and a range are specified for commands that use either,
103 the starting line for the command is the
105 line addressed by the range, and
107 subsequent lines are affected by the command, e.g. the command
109 prints out lines 3, 4, 5 and 6.
111 When only a line or range is specified, with no command, the implied
118 The command used is the most recent of the three commands to have been
119 used (including any use as a flag).
120 If none of these commands have been used before, the
122 command is the implied command.
123 When no range or count is specified and the command line is a blank line,
124 the current line is incremented by 1 and then the current line is displayed.
126 Zero or more whitespace characters may precede or follow the addresses,
127 count, flags, or command name.
128 Any object following a command name (such as buffer, file, etc.),
129 that begins with an alphabetic character,
130 should be separated from the command name by at least one whitespace
133 Any character, including
134 @LI{<carriage-return>},
138 retain their literal value when preceded by a backslash.
141 The following section describes the commands available in the
144 In each entry below, the tag line is a usage synopsis for the command.
146 Each command can be entered as the abbreviation
147 (those characters in the synopsis command word preceding the
150 the full command (all characters shown for the command word,
156 or any leading subset of the full command down to the abbreviation.
157 For example, the args command (shown as
168 command described below notes the new current line after it
169 is executed, as well as any options that affect the command.
171 @deftypefn Command {} {"}
174 Command lines beginning with the double-quote character
177 This permits comments in editor scripts and startup files.
179 @cindex "<control-D>"
180 @cindex "<end-of-file>"
181 @deftypefn Command {} {<control-D>}
183 @deftypefnx Command {} {<end-of-file>}
186 Write the next N lines, where N is the value of the
189 The command is the end-of-file terminal character, which may be
190 different on different terminals.
191 Traditionally, it is the
196 command ignored any preceding count, and the
197 @LI{<end-of-file>}character was ignored unless it was entered as the first character
199 This implementation treats it as a command
201 if entered as the first character of the command line, and otherwise
202 treats it as any other character.
205 Set to the last line written.
213 @deftypefn Command {} {!} {argument(s)}
215 @deftypefnx Command {} {[range]!} {argument(s)}
216 Execute a shell command, or filter lines through a shell command.
217 In the first synopsis, the remainder of the line after the
219 character is passed to the program named by the
221 option, as a single argument.
223 Within the rest of the line,
227 are expanded into the current and alternate pathnames, respectively.
230 is expanded with the command text of the previous
233 (Therefore, the command
238 The special meanings of
243 can be overridden by escaping them with a backslash.
248 command has yet been executed, it is an error to use an unescaped
255 do shell expansion on the strings provided as arguments.
256 If any of the above expansions change the command the user entered,
257 the command is redisplayed at the bottom of the screen.
260 then executes the program named by the
264 flag followed by the arguments (which are bundled into a single argument).
268 command is permitted in an empty file.
270 If the file has been modified since it was last completely written,
273 command will warn you.
277 character is displayed when the command completes.
279 In the second form of the
281 command, the remainder of the line after the
283 is passed to the program named by the
285 option, as described above.
286 The specified lines are passed to the program as standard input,
287 and the standard and standard error output of the program replace
291 Unchanged if no range was specified, otherwise set to the first
302 @deftypefn Command {[range]} {#} {[count] [flags]}
305 @deftypefnx Command {[range]} {nu[mber]} {[count] [flags]}
306 Display the selected lines, each preceded with its line number.
308 The line number format is
310 followed by two spaces.
313 Set to the last line displayed.
321 @deftypefn Command {@@} {buffer}
324 @deftypefnx Command {} {*} {buffer}
326 Each line in the named buffer is executed as an
329 If no buffer is specified, or if the specified buffer is
333 the last buffer executed is used.
336 @deftypefn Command {[range]} {<[< ...]} {[count] [flags]}
338 Shift lines left or right.
339 The specified lines are shifted to the left (for the
341 command) or right (for the
343 command), by the number of columns specified by the
346 Only leading whitespace characters are deleted when shifting left;
347 once the first column of the line contains a nonblank character,
350 command will succeed, but the line will not be modified.
352 If the command character
356 is repeated more than once, the command is repeated once for each
357 additional command character.
360 If the current line is set to one of the lines that are affected
361 by the command, it is unchanged.
362 Otherwise, it is set to the first nonblank character of the lowest
363 numbered line shifted.
371 @deftypefn Command {[line]} {=} {[flags]}
373 Display the line number of
374 @LI{line}(which defaults to the last line in the file).
383 @deftypefn Command {[range]} {>[> ...]} {[count] [flags]}
386 The specified lines are shifted to the right by the number of columns
389 option, by inserting tab and space characters.
390 Empty lines are not changed.
392 If the command character
394 is repeated more than once, the command is repeated once for each
395 additional command character.
398 Set to the last line modified by the command.
406 @deftypefn Command {} {ab[brev]} {lhs rhs}
408 Add an abbreviation to the current abbreviation list.
409 When inserting text in
411 each time a non-word character is entered after a word character,
412 a set of characters ending at the word character are checked for
415 If a match is found, they are replaced with
417 The set of characters that are checked for a match are defined as follows,
418 for inexplicable historical reasons.
419 If only one or two characters were entered before the non-word character
420 that triggered the check,
421 and after the beginning of the insertion,
422 or the beginning of the line or the file,
424 @LI{<blank>}character that was entered,
425 then the one or the both characters are checked for a match.
426 Otherwise, the set includes both characters,
427 as well as the characters that precede them that are the same word
428 class (i.e. word or non-word) as the
430 to last character entered before the non-word character that triggered
433 @LI{<blank>}character,
434 the beginning of the insertion,
435 or the beginning of the line or the file.
437 For example, the abbreviations:
439 @multitable {:abbreviate} {/*#i} {/********************}
440 @item :abbreviate @tab abc @tab ABC
441 @item :abbreviate @tab #i @tab #include
442 @item :abbreviate @tab /*#i @tab /*#include
444 will all work, while the abbreviations:
446 @multitable {:abbreviate} {/*#i} {/********************}
447 @item :abbreviate @tab a#i @tab A#include
448 @item :abbreviate @tab /* @tab /********************
450 will not work, and are not permitted by
453 To keep the abbreviation expansion from happening,
454 the character immediately following the
455 @LI{lhs}characters should be quoted with a
456 @LI{<literal-next>}character.
459 @LI{rhs}is itself subject to both further abbreviation expansion and further
469 @deftypefn Command {[line]} {a[ppend][!]}
471 The input text is appended to the specified line.
472 If line 0 is specified, the text is inserted at the beginning of the file.
473 Set to the last line input.
474 If no lines are input, then set to
476 or to the first line of the file if a
477 @LI{line}of 0 was specified.
478 Following the command name with a
482 option to be toggled for the duration of the command.
495 @deftypefn Command {} {ar[gs]}
497 Display the argument list.
498 The current argument is displayed inside of
503 The argument list is the list of operands specified on startup,
504 which can be replaced using the
515 @deftypefn Command {} {bg}
519 Background the current screen.
520 The screen is unchanged,
521 but is no longer accessible and disappears from the display.
524 command to bring the screen back to the display foreground.
527 Set to the current line when the screen was last edited.
533 @deftypefn Command {[range]} {c[hange][!]} {[count]}
535 Replace the lines with input text.
536 Following the command name with a
540 option to be toggled for the duration of the command.
543 Set to the last line input, or, if no lines were input,
544 set to the line before the target line, or to the first
545 line of the file if there are no lines preceding the target line.
556 @deftypefn Command {} {chd[ir][!]} {[directory]}
558 @deftypefnx Command {} {cd[!]} {[directory]}
559 Change the current working directory.
561 @LI{directory}argument is subjected to
564 When invoked with no directory argument and the
565 @LI{HOME}environment variable is set, the directory named by the
566 @LI{HOME}environment variable becomes the new current directory.
567 Otherwise, the new current directory becomes the directory returned
574 command will fail if the file has been modified since the last complete
576 You can override this check by appending a
578 character to the command.
590 @deftypefn Command {[range]} {co[py]} {line [flags]}
592 @deftypefnx Command {[range]} {t} {line [flags]}
593 Copy the specified lines (range) after the destination line.
594 Line 0 may be specified to insert the lines at the beginning of
604 @deftypefn Command {} {cs[cope]} {command [args]}
609 For more information, see the section of the reference manual entitled
610 @QB{Tags, Tag Stacks, and Cscope} .
613 @deftypefn Command {[range]} {d[elete]} {[buffer] [count] [flags]}
615 Delete the lines from the file.
616 The deleted text is saved in the specified buffer, or, if no buffer
617 is specified, in the unnamed buffer.
618 If the command name is followed by a letter that could be interpreted
619 as either a buffer name or a flag value (because neither a
621 @LI{flags}values were given),
623 treats the letter as a
624 @LI{flags}value if the letter immediately follows the command name,
625 without any whitespace separation.
626 If the letter is preceded by whitespace characters,
627 it treats it as a buffer name.
630 Set to the line following the deleted lines,
631 or to the last line if the deleted lines were at the end.
637 @deftypefn Command {} {di[splay]} {b[uffers] | c[onnections] | s[creens] | t[ags]}
641 connections, screens or tags.
644 command takes one of three additional arguments, which are as follows:
647 Display all buffers (including named, unnamed, and numeric)
650 Display the source directories for all attached
654 Display the file names of all background screens.
656 Display the tags stack.
666 @deftypefn Command {} {e[dit][!]} {[+cmd] [file]}
668 @deftypefnx Command {} {ex[!]} {[+cmd] [file]}
669 Edit a different file.
670 If the current buffer has been modified since the last complete write,
671 the command will fail.
672 You can override this by appending a
674 character to the command name.
678 option is specified, that
680 command will be executed in the new file.
683 command may be used, although the most common use of this feature is
684 to specify a line number or search pattern to set the initial location
687 Capitalizing the first letter of the command, i.e.
693 mode, will edit the file in a new screen.
694 In this case, any modifications to the current file are ignored.
697 If you have previously edited the file, the current line will be set
698 to your last position in the file.
699 If that position does not exist, or you have not previously edited the
700 file, the current line will be set to the first line of the file if
703 mode, and the last line of the file if you are in
710 @deftypefn Command {} {exu[sage]} {[command]}
716 @LI{command}is specified, a usage statement for that command is displayed.
717 Otherwise, usage statements for all
719 commands are displayed.
728 @deftypefn Command {} {f[ile]} {[file]}
730 Display and optionally change the file name.
731 If a file name is specified, the current pathname is changed to the
733 The current pathname, the number of lines, and the current position
734 in the file are displayed.
743 @deftypefn Command {} {fg} {[name]}
747 Foreground the specified screen.
748 If the argument name doesn't exactly match the name of a file displayed
749 by a background screen,
750 it is compared against the last component of each of the file names.
751 If no background screen is specified,
752 the first background screen is foregrounded.
755 foregrounding causes the current screen to be swapped with the backgrounded
757 Capitalizing the first letter of the command, i.e.
759 will foreground the backgrounded screen in a new screen instead of
760 swapping it with the current screen.
763 Set to the current line when the screen was last edited.
769 @deftypefn Command {[range]} {g[lobal]} {/pattern/ [commands]}
772 @deftypefnx Command {[range]} {v} {/pattern/ [commands]}
773 Apply commands to lines matching (or not matching) a pattern.
774 The lines within the given range that match
778 the given pattern are selected.
781 command(s) are executed with the current line
783 set to each selected line.
784 If no range is specified, the entire file is searched for matching,
785 or not matching, lines.
787 Multiple commands can be specified, one per line, by escaping each
788 @LI{<newline>}character with a backslash, or by separating commands with a
791 If no commands are specified, the command defaults to the
800 commands, the input text must be part of the global command line.
801 In this case, the terminating period can be omitted if it ends the commands.
805 command may also be specified as one of the
808 In this mode, input is taken from the terminal.
813 mode causes the next line matching the pattern to be selected and
815 to be reentered, until the list is exhausted.
822 commands cannot be used as part of these commands.
829 are turned off for the duration of the
836 The last line modified.
852 @deftypefn Command {} {he[lp]}
854 Display a help message.
863 @deftypefn Command {[line]} {i[nsert][!]}
865 The input text is inserted before the specified line.
866 Following the command name with a
870 option setting to be toggled for the duration of this command.
873 Set to the last line input; if no lines were input,
874 set to the line before the target line, or to the first line
875 of the file if there are no lines preceding the target line.
884 @deftypefn Command {[range]} {j[oin][!]} {[count] [flags]}
886 Join lines of text together.
889 @LI{count}specified to the
891 command specifies that the last line of the
893 @LI{count}subsequent lines will be joined.
894 (Note, this differs by one from the general rule where only
896 subsequent lines are affected.)
898 If the current line ends with a whitespace character, all whitespace
899 is stripped from the next line.
900 Otherwise, if the next line starts with a open parenthesis
903 Otherwise, if the current line ends with a question mark
910 Otherwise, insert a single space.
914 character to the command name causes a simpler join with no
915 white-space processing.
924 @deftypefn Command {[range]} {l[ist]} {[count] [flags]}
926 Display the lines unambiguously.
927 Tabs are displayed as
929 and the end of the line is marked with a
934 Set to the last line displayed.
942 @deftypefn Command {} {map[!]} {[lhs rhs]}
944 Define or display maps (for
952 are not specified, the current set of command mode maps are displayed.
955 character is appended to to the command,
956 the text input mode maps are displayed.
960 character sequence is entered in
962 the action is as if the corresponding
967 character is appended to the command name,
968 the mapping is effective during text input mode,
969 otherwise, it is effective during command mode.
972 to have two different macro definitions at the same time: one for command
973 mode and one for input mode.
975 Whitespace characters require escaping with a
976 @LI{<literal-next>}character to be entered in the
977 @LI{lhs}string in visual mode.
979 Normally, keys in the
980 @LI{rhs}string are remapped (see the
983 and it is possible to create infinite loops.
984 However, keys which map to themselves are not further remapped,
985 regardless of the setting of the
988 For example, the command
998 To exit an infinitely looping map, use the terminal
999 @LI{<interrupt>}character.
1011 @deftypefn Command {[line]} {ma[rk]} {<character>}
1013 @deftypefnx Command {[line]} {k} {<character>}
1014 Mark the line with the mark
1020 can then be used as an address in any command that uses one.
1029 @deftypefn Command {[range]} {m[ove]} {line}
1031 Move the specified lines after the target line.
1032 A target line of 0 places the lines at the beginning of the file.
1035 Set to the first of the moved lines.
1041 @deftypefn Command {} {mk[exrc][!]} {file}
1043 Write the abbreviations, editor options and maps to the specified
1045 Information is written in a form which can later be read back in
1051 @LI{file}already exists, the
1054 This check can be overridden by appending a
1056 character to the command.
1065 @deftypefn Command {} {n[ext][!]} {[file ...]}
1067 Edit the next file from the argument list.
1070 command will fail if the file has been modified since the last complete
1072 This check can be overridden by appending the
1074 character to the command name.
1075 The argument list can optionally be replaced by specifying a new one
1076 as arguments to this command.
1077 In this case, editing starts with the first file on the new list.
1079 Capitalizing the first letter of the command, i.e.
1083 mode, will set the argument list and edit the file in a new screen.
1084 In this case, any modifications to the current file are ignored.
1087 Set as described for the
1091 Affected by the options
1098 @deftypefn Command {[line]} {o[pen]} {/pattern/ [flags]}
1101 Open mode is the same as being in
1103 but with a one-line window.
1106 commands are available.
1107 If a match is found for the optional RE argument,
1108 the cursor is set to the start of the matching pattern.
1110 @emph{This command is not yet implemented.}
1113 Unchanged, unless the optional RE is specified, in which case it is
1114 set to the line where the matching pattern is found.
1122 @deftypefn Command {} {pre[serve]}
1124 Save the file in a form that can later be recovered using the
1128 When the file is preserved, an email message is sent to the user.
1137 @deftypefn Command {} {prev[ious][!]}
1139 Edit the previous file from the argument list.
1142 command will fail if the file has been modified since the last complete
1144 This check can be overridden by appending the
1146 character to the command name.
1148 Capitalizing the first letter of the command, i.e.
1152 mode, will edit the file in a new screen.
1153 In this case, any modifications to the current file are ignored.
1156 Set as described for the
1160 Affected by the options
1168 @deftypefn Command {[range]} {p[rint]} {[count] [flags]}
1170 Display the specified lines.
1173 Set to the last line displayed.
1183 @deftypefn Command {[line]} {pu[t]} {[buffer]}
1185 Append buffer contents to the current line.
1186 If a buffer is specified, its contents are appended to the line,
1187 otherwise, the contents of the unnamed buffer are used.
1190 Set to the line after the current line.
1196 @deftypefn Command {} {q[uit][!]}
1198 End the editing session.
1199 If the file has been modified since the last complete write, the
1202 This check may be overridden by appending a
1204 character to the command.
1206 If there are more files to edit, the
1211 character to the command name or entering two
1219 in a row) will override this check and the editor will exit.
1228 @deftypefn Command {[line]} {r[ead][!]} {[file]}
1231 A copy of the specified file is appended to the line.
1233 @LI{line}is 0, the copy is inserted at the beginning of the file.
1234 If no file is specified, the current file is read; if there is no
1236 @LI{file}becomes the current file.
1237 If there is no current file and no
1238 @LI{file}is specified, then the
1243 @LI{file}is preceded by a
1246 @LI{file}is treated as if it were a shell command, and passed to the program
1250 The standard and standard error outputs of that command are read into
1251 the file after the specified line.
1252 The special meaning of the
1254 character can be overridden by escaping it with a backslash
1261 the current line is set to the last line read.
1264 the current line is set to the first line read.
1270 @deftypefn Command {} {rec[over]} {file}
1273 @LI{file}if it was previously saved.
1274 If no saved file by that name exists, the
1276 command behaves equivalently to the
1281 Set as described for the
1289 @deftypefn Command {} {res[ize]} {[+|-]size}
1293 Grow or shrink the current screen.
1295 @LI{size}is a positive, signed number, the current screen is grown by that many lines.
1297 @LI{size}is a negative, signed number, the current screen is shrunk by that many lines.
1299 @LI{size}is not signed, the current screen is set to the specified
1301 Applicable only to split screens.
1310 @deftypefn Command {} {rew[ind][!]}
1312 Rewind the argument list.
1313 If the current file has been modified since the last complete write,
1317 This check may be overridden by appending the
1319 character to the command.
1321 Otherwise, the current file is set to the first file in the argument
1325 Set as described for the
1337 @deftypefn Command {} {se[t]} {[option[=[value]] ...] [nooption ...] [option? ...] [all]}
1339 Display or set editor options.
1340 When no arguments are specified, the editor option
1342 and any editor options whose values have been changed from the
1343 default settings are displayed.
1345 @LI{all}is specified, the values of all of editor options are displayed.
1347 Specifying an option name followed by the character
1349 causes the current value of that option to be displayed.
1352 can be separated from the option name by whitespace characters.
1355 is necessary only for Boolean valued options.
1356 Boolean options can be given values by the form
1361 String and numeric options can be assigned by the form
1362 @QT{set option=value}.
1363 Any whitespace characters in strings can be included literally by preceding
1364 each with a backslash.
1365 More than one option can be set or listed by a single set command,
1366 by specifying multiple arguments, each separated from the next by
1367 whitespace characters.
1376 @deftypefn Command {} {sh[ell]}
1378 Run the shell program.
1379 The program named by the
1381 option is run with a
1383 (for interactive) flag.
1384 Editing is resumed when that program exits.
1395 @deftypefn Command {} {so[urce]} {file}
1399 commands from a file.
1401 commands may be nested.
1410 @deftypefn Command {[range]} {s[ubstitute]} {[/pattern/replace/] [options] [count] [flags]}
1413 @deftypefnx Command {[range]} {&} {[options] [count] [flags]}
1415 @deftypefnx Command {[range]} {~} {[options] [count] [flags]}
1417 Replace the first instance of
1418 @LI{pattern}with the string
1419 @LI{replace}on the specified line(s).
1422 argument is not specified, the
1427 Any character other than an alphabetic, numeric, <blank> or backslash
1428 character may be used as the delimiter.
1431 @LI{options}includes the letter
1433 (confirm), you will be prompted for confirmation before each replacement
1435 An affirmative response (in English, a
1437 character) causes the replacement to be made.
1438 A quit response (in English, a
1440 character) causes the
1442 command to be terminated.
1443 Any other response causes the replacement not to be made, and the
1447 @LI{options}includes the letter
1449 (global), all nonoverlapping instances of
1450 @LI{pattern}in the line are replaced.
1454 version of the command is the same as not specifying a pattern
1455 or replacement string to the
1459 is replaced by the pattern and replacement information from the
1460 previous substitute command.
1464 version of the command is the same as
1468 except that the search pattern used is the last RE used in
1470 command, not necessarily the one used in the last
1474 For example, in the sequence
1487 command may be interrupted, using the terminal interrupt character.
1488 All substitutions completed before the interrupt are retained.
1491 Set to the last line upon which a substitution was made.
1501 @deftypefn Command {} {su[spend][!]}
1504 @deftypefnx Command {} {st[op][!]}
1505 @deftypefnx Comamnd {} <control-Z>
1506 Suspend the edit session.
1509 character to these commands turns off the
1511 option for the command.
1524 @deftypefn Command {} {ta[g][!]} {tagstring}
1526 Edit the file containing the specified tag.
1527 If the tag is in a different file, then the new file is edited.
1528 If the current file has been modified since the last complete write,
1532 This check can be overridden by appending the
1534 character to the command name.
1538 command searches for
1539 @LI{tagstring}in the tags file(s) specified by the
1544 for more information on tags files.)
1546 Capitalizing the first letter of the command, i.e.
1550 mode, will edit the file in a new screen.
1551 In this case, any modifications to the current file are ignored.
1554 Set to the line indicated by the tag.
1566 @deftypefn Command {} {tagn[ext][!]}
1568 Edit the file containing the next context for the current tag.
1569 If the context is in a different file, then the new file is edited.
1570 If the current file has been modified since the last complete write,
1574 This check can be overridden by appending the
1576 character to the command name.
1578 Capitalizing the first letter of the command, i.e.
1582 mode, will edit the file in a new screen.
1583 In this case, any modifications to the current file are ignored.
1586 Set to the line indicated by the tag.
1596 @deftypefn Command {} {tagp[op][!]} {[file | number]}
1598 Pop to the specified tag in the tags stack.
1601 @LI{number}is specified, the
1603 command pops to the most recent entry on the tags stack.
1606 @LI{number}is specified, the
1608 command pops to the most recent entry in the tags stack for that file,
1609 or numbered entry in the tags stack, respectively.
1612 command for information on displaying the tags stack.)
1614 If the file has been modified since the last complete write, the
1617 This check may be overridden by appending a
1619 character to the command name.
1622 Set to the line indicated by the tag.
1632 @deftypefn Command {} {tagp[rev][!]}
1634 Edit the file containing the previous context for the current tag.
1635 If the context is in a different file, then the new file is edited.
1636 If the current file has been modified since the last complete write,
1640 This check can be overridden by appending the
1642 character to the command name.
1644 Capitalizing the first letter of the command, i.e.
1648 mode, will edit the file in a new screen.
1649 In this case, any modifications to the current file are ignored.
1652 Set to the line indicated by the tag.
1662 @deftypefn Command {} {tagt[op][!]}
1664 Pop to the least recent tag on the tags stack, clearing the tags stack.
1666 If the file has been modified since the last complete write, the
1669 This check may be overridden by appending a
1671 character to the command name.
1674 Set to the line indicated by the tag.
1684 @deftypefn Command {} {una[bbrev]} {lhs}
1686 Delete an abbreviation.
1688 @LI{lhs}from the current list of abbreviations.
1697 @deftypefn Command {} {u[ndo]}
1699 Undo the last change made to the file.
1704 and map sequences are considered a single command.
1707 command alternates between these two states, and is its own inverse.
1710 Set to the last line modified by the command.
1716 @deftypefn Command {} {unm[ap][!]} {lhs}
1718 Unmap a mapped string.
1719 Delete the command mode map definition for
1723 character is appended to the command name, delete the text input mode
1724 map definition instead.
1733 @deftypefn Command {} {ve[rsion]}
1735 Display the version of the
1740 @deftypefn Command {[line]} {vi[sual]} {[type] [count] [flags]}
1747 @LI{type}is optional, and can be
1755 command, to specify the position of the specified line in the screen
1757 (The default is to place the line at the top of the screen window.)
1759 @LI{count}specifies the number of lines that will initially be displayed.
1760 (The default is the value of the
1766 @LI{line}is specified, in which case it is set to that line.
1772 @deftypefn Command {} {vi[sual][!]} {[+cmd] [file]}
1778 @QT{edit[!] [+cmd] [file]}
1781 Capitalizing the first letter of the command, i.e.
1783 will edit the file in a new screen.
1784 In this case, any modifications to the current file are ignored.
1787 @deftypefn Command {} {viu[sage]} {[command]}
1793 @LI{command}is specified, a usage statement for that command is displayed.
1794 Otherwise, usage statements for all
1796 commands are displayed.
1805 @deftypefn Command {[range]} {w[rite][!]} {[>>] [file]}
1807 @deftypefnx Command {[range]} {w[rite]} {[!] [file]}
1809 @deftypefnx Command {[range]} {wn[!]} {[>>] [file]}
1811 @deftypefnx Command {[range]} {wq[!]} {[>>] [file]}
1813 The specified lines (the entire file, if no range is given) is written
1817 @LI{file}is not specified, the current pathname is used.
1819 @LI{file}is specified, and it exists, or if the current pathname was set using the
1821 command, and the file already exists, these commands will fail.
1824 character to the command name will override this check and the write
1825 will be attempted, regardless.
1827 Specifying the optional
1829 string will cause the write to be appended to the file, in which case
1830 no tests are made for the file already existing.
1832 If the file is preceded by a
1834 character, the program named by the shell edit option is
1835 invoked with file as its second argument, and the specified
1836 lines are passed as standard input to that command.
1839 in this usage must be separated from command name by at least one
1840 whitespace character.
1841 The special meaning of the
1843 may be overridden by escaping it with a backslash
1849 version of the write command will exit the editor after writing the file,
1850 if there are no further files to edit.
1853 character to the command name or entering two
1861 in a row) will override this check and the editor will exit,
1862 ignoring any files that have not yet been edited.
1866 version of the write command will move to the next file after writing
1867 the file, unless the write fails.
1880 @deftypefn Command {[range]} {x[it][!]} {[file]}
1882 Write the file if it has been modified.
1883 The specified lines are written to
1885 if the file has been modified since the last complete write to any
1888 @LI{range}is specified, the entire file is written.
1892 command will exit the editor after writing the file,
1893 if there are no further files to edit.
1896 character to the command name or entering two
1904 in a row) will override this check and the editor will exit,
1905 ignoring any files that have not yet been edited.
1918 @deftypefn Command {[range]} {ya[nk]} {[buffer] [count]}
1920 Copy the specified lines to a buffer.
1921 If no buffer is specified, the unnamed buffer is used.
1930 @deftypefn Command {[line]} {z} {[type] [count] [flags]}
1934 @LI{type}is specified, then
1935 @LI{count}lines following the specified line are displayed.
1937 @LI{count}is the value of the
1941 @LI{type}argument changes the position at which
1942 @LI{line}is displayed on the screen by changing the number of lines
1943 displayed before and after
1946 @LI{type}characters may be used:
1949 Place the line at the bottom of the screen.
1951 Place the line at the top of the screen.
1953 Place the line in the middle of the screen.
1955 Write out count lines starting
1956 @LI{count * 2}lines before
1958 the net effect of this is that a
1962 command writes the previous page.
1965 @LI{line}on the screen with a line of hyphens displayed immediately before and
1967 The number of preceding and following lines of text displayed are
1968 reduced to account for those lines.
1972 Set to the last line displayed, with the exception of the
1975 where the current line is set to the line specified by the command.