( \fB.\fR , \fB.\fR ) \fBnumber\fR \fIcount\fR \fIflags\fR
command prints each specified line preceded by its buffer line
The current line is left at the last line printed.
( \fB.\fR ) \fBopen\fR \fIflags\fR
( \fB.\fR ) \fBopen\fR /\fIpat\|\fR/ \fIflags\fR
command enters intraline editing mode at each addressed line.
then the cursor will be placed initially at the beginning of the
string matched by the pattern.\u\s-2\(dg\s0\d
may be delimited only by `/' characters;
the forms `\e/' and `\e&/' are also not allowed here.
`n' operation without leaving open.
The current line is left at the last line opened.
mode description below for more details.
The current editor buffer is saved as though the editor had just crashed.
This command is for use only in emergencies when a
command has resulted in an error and you don't know how to save your work.
you should seek help immediately.
( \fB.\fR , \fB.\fR )\|\fBprint\fR \fIcount\fR \fIflags\fR
command prints the specified lines
with non-printing characters normally escaped as `?'.
The current line is left at the last line printed.
The lines removed from the editing buffer by the last command which had the
ability to change the buffer are restored after the addressed line.
can be used, e.g., after a
command to retrieve the lines changed away when you decide that you want
both these and the lines you replaced them with.
No automatic write of the editor buffer to a file is performed.
issues a warning message if the file has changed
since the last write command was issued and it
offers a second chance to
will also complain if there are more files in the argument
The variant form suppresses these complaints.
( \fB.\fR ) \fBread\fR \fIfilename\fR
command places a copy of the text of the given file in the
editing buffer after the specified line.
is given the current file name is used.
The current file name is not changed unless there is none in which
becomes the current name.
The sensibility restrictions for the
If the file buffer is empty and there is no current name then
Address `0' is legal for this command and causes the file to be read at
the beginning of the buffer.
Statistics are given as for the
the current line is the last line read.
may be used to retrieve the contents of the editor buffer after a system
also occurs implicitly when the
option is specified on the command line.
A file name should be given to
unless the file of the current name is to be recovered.
Thus a name is always required on the command line.
results in the removal of the saved buffer.
The recovered buffer contents should be checked for sensibility
It is not possible to recover from errors occurring during a
command restores the default settings of all numeric and
\fBset\fR \fIparameter\fR
command may be used to interrogate and to give new values to options.
With no arguments it prints those options whose values have been
changed from their defaults;
it prints all of the option values
By giving an option name followed by a `?'
the current value of a single option may be interrogated.
The `?' is unnecessary unless the option is Boolean valued.
Boolean options are given values either by the form
`set option' to set them on or
`set nooption' to set them off;
string and numeric options are assigned via the form
More than one parameter may be given to
they are interpreted left-to-right.
It is also possible to interrogate the current values of the
current and alternate file names, and the previous
shell escape command by supplying the parameter `%', `\(ga', or `!'
When it terminates, editing resumes.
to read commands from the specified file.
( \fB.\fR , \fB.\fR ) \fBsubstitute\fR /\fIpat\fR\|/\fIrepl\fR\|/ \fIoptions\fR \fIcount\fR \fIflags\fR
On each specified line, the first instance of pattern
is replaced by replacement pattern
indicator option character `g'
appears, then all instances are substituted;
indication character `c' appears,
then before each substitution the line to be substituted
is typed with the string to be substituted marked
By typing an `y' one can cause the substitution to be performed,
otherwise no change takes place.
After a substitute the current line is the last line substituted.
See the regular expression description for an explanation of metasequences
In addition to these sequences, lines may be split by substituting
new-line characters into them.
must be escaped by preceding it with a `\e'.
then two escaping `\e' characters will be needed.)
command causes the contents of the editor temporary file to be
synchronized to reflect the current state of editing.
commands are done automatically whenever there is a difference of
15 lines or more between the in-core buffer and the temporary.
for those who are worried about losing work due to an editor or system crash.
( \fB.\fR , \fB.\fR ) \fBtabulate\fR \fI!\fR \fIcount\fR \fIflags\fR
command causes leading white space to be converted to
tabs on the specified lines.
The variant causes this tabulation to occur throughout each line.
The current line is left at the last line where a change occurred.
( \fB.\fR , \fB.\fR ) \fBtranscribe\fR \fIaddr\fR
command reverses the changes made in the buffer by the last
commands are considered a single command for the purpose of
file system cannot be undone.
the current line is the first line restored
or the line before the first line deleted if no lines were restored.
For commands with more global effect,
the current line regains it pre-command value after an
always marks the previous value of the current line `\fB.\fR'
( 1 , $ ) \fBv\fR /\fIpat\fR\|/ \fIcmds\fR
command is a synonym for the
command variant `global!'.
command prints the current version number of the editor
as well as the date the binary was created.
( \fB.\fR ) \fBvisual\fR \fItype\fR \fIflags\fR
command enters \fIvisual\fR mode at the specified line.
is optional and may be `+', `\-' , `\(ua' (`^') or `\fB.\fR'
command to specify the placement of the specified line on the screen.
is omitted, the specified line is placed as the first on the screen.
the current line is the last line the cursor was on when it ended.
See the section describing
( 1 , $ ) \fBwrite\fR \fI!\fR \fIfile\fR
( 1 , $ ) \fBwrite\fR \fI!\fR >> \fIfile\fR
command places data from the file buffer back into the file system.
The first form of the command will write to a file only if it is
if the file does not exist,
or if the file is actually a teletype,
If the file does not exist it is created.
The current file name is changed only if there is no current file
The current line is unchanged by this command, and feedback is given
as to the number of lines and characters written as for the
The second form is used to write the buffer contents at the end of
the variant suppresses the file existence and type checks.
If an error occurs while writing the current and
considers that there has been ``No write since last change''
even if the buffer had not previously been modified.
( \fB.\fR , \fB.\fR ) \fBxpand\fR \fIcount\fR \fIflags\fR
( \fB.\fR , \fB.\fR )\|\fByank\fR \fIcount\fR
command causes the contents of the addressed lines to define the text
to be placed in the buffer by a succeeding
The addressed lines are not affected.
( \fB.\fR ) \fBz\fR \fItype\fR \fIcount\fR
command gives access to windows of text.
The default number of logical lines in a window
or may be given explicitly by the
The various types and their meanings are:
\fB\&.\fR window around the current line
\- window ending at the current line
+ window starting after the current line
omitted window starting at the current line
\(ua or ^ window before this window
displays a window of text with the current line in the center
delimited by lines of `\-' characters.
For all commands forms except
the current line is left at the last line printed;
`\fB.\fR' addresses the bracketed line.
The characters `+', `^' and `\-' may be repeated for
On a \s-2CRT\s0 the screen is cleared before display begins unless a
count which is less than the screen size is given.
The remainder of the line after the `!' character is sent to a shell
The current line is unchanged by this command.
`%' and `\`' are expanded as in filenames and the character
`!' is replaced with the text of the previous command.
`!!' repeats the last such shell escape.
If any such expansion is performed, the expanded line will be echoed.
If there has been ``No write'' of the buffer contents since the last
change to the editing buffer, then a diagnostic will be produced
before the command is executed as a warning.
A single `!' is printed when the command completes.
The `=' command prints the line number of the
The current line is unchanged.
( \fB.\fR , \fB.\fR ) \fB>\fR \fIcount\fR \fIflags\fR
( \fB.\fR , \fB.\fR ) \fB<\fR \fIcount\fR \fIflags\fR
The `>' right shift and `<' left shift
commands perform intelligent shifting on the specified lines.
The quantity of shift is determined
option and the repetition of the specification character.
Thus `>>' causes the current line to be right shifted
Only white space is shifted; no non-white space characters are
discarded in a left-shift.\u\s-2\(dg\s0\d
\(dg White space characters are blank and tab.
The current line becomes the last line which changed due to the
receives an end-of-file (control-d)
it interprets this as being a request for a scroll through the file
An address alone causes the addressed line to be printed.
A blank line alone is thus useful for stepping through text.
( \fB.\fR , \fB.\fR ) \fB:\fR \fIcount\fR \fIflags\fR
command is used to override the options
so as to print a line without these features while
( \fB.\fR , \fB.\fR ) \fB&\fR \fIoptions\fR \fIcount\fR \fIflags\fR
command repeats the previous
( \fB.\fR , \fB.\fR ) \fB\s+2~\s0\fR \fIoptions\fR \fIcount\fR \fIflags\fR
command replaces the previous regular expression with the previous
replacement pattern from a substitution.