In the following command descriptions, the
default addresses are shown in parentheses,
( \fB.\fR ) \fBappend\fR \fI!\fR
command reads the input text and places it after the specified line.
After the command, `\fB.\fR'
addresses the last line input or the
specified line if no lines were input.
text is placed at the beginning of the buffer.
The variant flag toggles the setting for
The members of the argument list are given starting with the current
one or, if the variant is given, starting with the beginning of
( \fB.\fR , \fB.\fR ) \fBchange\fR \fI!\fR \fIcount\fR
command replaces the specified lines with the input \fItext\fR.
The current line becomes the last line input;
if no lines were input it is left as for a
\fBchdir\fR \fIdirectory\fR
The specified \fIdirectory\fR becomes the current directory.
If no directory is specified, the current value of the
option is used as the target directory.
the current file is not considered to have been
so that write restrictions on pre-existing files apply.
( \fB.\fR , \fB.\fR )\|\fBcopy\fR \fIaddr\fR \fIflags\fR
of the specified lines is placed after
addresses the last line of the copy.
( \fB.\fR , \fB.\fR )\|\fBdelete\fR \fIcount\fR \fIflags\fR
command removes the specified lines from the buffer.
The line after the last line deleted becomes the current line;
if the lines deleted were originally at the end,
the new last line becomes the current line.
is echoed onto the standard output up to a `|' or newline character.
These (and any) characters may be included in
by preceding them with a `\e'.
Initial blanks are stripped from \fItext\fR.
\fBedit\fR \fI!\fR \fIfilename\fR
\fBex\fR \fI!\fR \fIfilename\fR
command is used to begin an editing session on a new file and is
composed of several distinct actions.
first checks to see if the buffer has been modified since the last
a warning is issued and the
In this case, the user has a second and last chance to write out the
command is executed without a
and before any further modifications to the buffer,
the editing changes to the buffer will be lost.
This entire warning procedure is suppressed if the variant flag is given.
command next deletes the entire contents of the editor buffer
making the named file the current file and printing its name.
After insuring that this file is sensible,
i.e. that it is not a binary file such as a directory,
a block or character special file other than
or a binary or executable file
(as indicated by the first word),
reads the file into the editor buffer.
If the read of the file completes without error,
the number of lines and characters read is typed.
If there were any dirty (non-\s-2ASCII\s0) characters
in the file they are stripped of their non-\s-2ASCII\s0
and any null characters in the file are discarded.
If none of these errors occurred, the file is considered
If the last line of the input file is missing the trailing
newline character, it will be supplied and a complaint will be issued.
This command leaves the current line `\fB.\fR' at the last line read.
( \fB.\fR , \fB.\fR ) \fBexpand\fR \fI!\fR \fIcount\fR \fIflags\fR
command processes the text of the specified lines,
converting tabs to an appropriate number of spaces.
The current line is left at the last line which had a tab expanded.
The current filename is displayed along with an indication of whether
it is considered `[Edited]',
whether it has been `[Modified]' since the last
and the number of lines in the buffer.
\fBfile\fR \fIfilename\fR
The current file is changed to
( 1 , $ ) \fBglobal\fR \fI!\fR /\fIpat\|\fR/ \fIcmds\fR
command first marks each line among those specified which matches
the given regular expression.
Then the given command list is executed with `\fB.\fR' initially
In the variant form the list is executed at each line not matching
the given regular expression.
The command list consists of the remaining commands on the current
input line and may continue to multiple lines by ending all but the
last such line with a `\e'.
commands and associated input are permitted;
the `\fB.\fR' terminating input may be omitted if it would be on the
last line of the command list.
commands are permitted in the command list and take input from the terminal.
command itself may not appear in
command is also not permitted there,
instead can be used to reverse the entire
option is temporarily infinite,
in deference to a \fInotify\fR for the entire global.
Finally, the context mark `\'\'' is set to the value of
`.' before the global command begins and is not changed during a global
command accepts keywords related to the editor and,
if there is information in its data base about that
supplies the information.
A list of topics can be had by
The data files for help are kept in the directory
( \fB.\fR )\|\fBinsert\fR \fI!\fR
command places the given text before the specified line.
The current line is left at the last line input;
if there were none input it is left at the line before the addressed line.
This command differs from
only in the placement of text.
( \fB.\fR , \fB.\fR+1 ) \fBjoin\fR \fI!\fR \fIcount\fR \fIflags\fR
command places the text from a specified range of lines
White space is adjusted at each junction to provide at least
If there is already white space at the end of the line,
then the white space at the start of the next line will be discarded.
The variant causes a simpler
with no white space processing.
( \fB.\fR ) \fBk\fR \fIx\fR
( \fB.\fR , \fB.\fR ) \fBlist\fR \fIcount\fR \fIflags\fR
command prints the specified lines in a more unambiguous way;
non-graphic characters are escaped in octal,
tabs and backspaces are printed as
`\-' being omitted if the terminal can not overstrike.
The end of each line is marked with a trailing `$'.
The current line is left at the last line printed.
( \fB.\fR ) \fBmark\fR \fIx\fR
command gives the specified line mark
a single lower case letter.
must be preceded by a blank or a tab.)
Subsequently, the addressing form `\'x' addresses this line.
The current line is not affected by this command.
( \fB.\fR , \fB.\fR ) \fBmove\fR \fIaddr\fR
command repositions the specified lines after
The first of the moved lines becomes the current line.
The next file from the command line argument list is edited.
The variant suppresses ``No write since last change''
warnings before performing the
\fBnext\fR \fI!\fR \fIfilelist\fR
is expanded and the resulting list replaces the
the first file in the new list is then edited.