1BSD/exrefm/exrefm5.n

.if !\n(xx .so tmac.e
.SH
Command summary
.PP
Summarizing the discussion above,
the general form of an
.EX
command is:
.tr **
.DS
\fIaddress\fR \fBcommand\fR \fI! parameters count flags\fR
.DE
All parts are optional; the degenerate case is the
empty command which prints the next line in the file.
.PP
The following table summarizes
.EX
command formats and
the shortest allowable abbreviations for commands.
Except as noted, all commands which take addresses
assume the current line as default if no addresses are given.
Each command will be discussed in more detail in the next section.
.TS H
center box;
c s s
a | l | l
aB | lB | l.
Command summary
_
Prototype	Abbr.	Description
_
.TH
append \fI!\fR	a	\fRAppend text after addressed lines\fR\fR
args \fI!\fR	ar	\fRPrint argument list\fR\fR
cd \fIdir\fR	cd	\fRSynonym for \fIchdir\fR\fR
change \fI!\fR	c	\fRChange text of specified lines\fR\fR
chdir \fIdir\fR	chd	\fRChange working directory\fR\fR
copy \fIaddr\fR	co	\fRMake a copy of specified lines after \fIaddr\fR\fR\fR
delete \fIcount\fR	d	\fRDelete specified lines\fR\fR
echo \fItext\fR	ec	\fREcho \fItext\fR to output\fR\fR
edit \fIfile\fR	ed	\fRSynonym for \fIex\fR\fR\fR
ex \fIfile\fR	e	\fREdit specified file\fR\fR
expand \fIcount\fR	exp	\fRExpand tabs to spaces\fR\fR
file \fIfile\fR	f	\fRDisplay/change current file\fR\fR
global \fI/pat\|\fR/ \fIcmds\fR\|\u\s-2\(dg\s0\d\|\u\s-2\(dd\s0\d	g	\fRExecute \fIcmds\fR on lines matching \fIpat\fR\fR\fR
help \fItopic\fR	h	\fRProvide information on \fItopic\fR\fR
insert \fI!\fR	i	\fRInsert text before addressed line\fR\fR
join \fI!\fR \fIcount\fR	j	\fRJoin lines together\fR\fR
k \fIx\fR	k	\fRSynonym for \fImark\fR\fR\fR
list \fIcount\fR	l	\fRPrint lines more unambiguously\fR\fR
mark \fIx\fR	ma	\fRMark addressed line with letter \fIx\fR\fR\fR
move \fIaddr\fR	m	\fRMove specified lines after \fIaddr\fR\fR\fR
next \fI!\fR	n	\fREdit next file in argument list\fR\fR
next \fI!\fR \fIfilelist\fR	n	\fRRespecify argument list; edit first file\fR\fR
open \fI/pat\fR\|/	o	\fRIntraline edit of specified line\fR\fR
preserve	pre	\fRSave buffer when disaster strikes\fR\fR
print \fIcount\fR	p	\fRPrint addressed lines\fR\fR
put	pu	\fRRestore lines\fR\fR
quit \fI!\fR	q	\fRTerminate editor session\fR\fR
read \fIfile\fR	r	\fRRead \fIfile\fR into buffer after current line\fR\fR
recover \fIfile\fR	rec	\fRRecover editing buffer after disaster\fR\fR
reset	res	\fRRestore option default values\fR\fR
rewind	rew	\fRRewind argument list; edit first file\fR\fR
set \fIparams\fR	se	\fRSet/interrogate options\fR\fR
shell	sh	\fRInvoke another, interactive, shell\fR\fR
source \fIfile\fR	so	\fRRead editor commands from \fIfile\fR\fR\fR
substitute\fI/pat\|\fR/\fIrepl\|\fR/ \fIflags\fR \fIcount\fR\|\u\s-2\(dg\s0\d	su	\fRSubstitute \fIrepl\fR for \fIpat\fR\fR\fR
sync	sy	\fRSynchronize the temporary file\fR\fR
tabulate \fIcount\fR	ta	\fRConvert (leading) blanks to tabs\fR\fR
transcribe \fIaddr\fR	t	\fRSynonym for \fIcopy\fR\fR\fR
undo \fI!\fR	u	\fRReverse effect of last command\fR\fR
v\u\s-2\(dg\s0\d	v	\fR\fRSynonym for ``\fIglobal!\fR\|'' variant\fR\fR
version	ve	\fRPrint current version information\fR\fR
visual \fItype\fR	vi	\fREnter visual mode\fR\fR
write \fI!\fR \fIfile\fR\|\u\s-2\(dd\s0\d	w	\fRWrite specified lines to \fIfile\fR\fR\fR
write \fI!\fR >> \fIfile\fR\|\u\s-2\(dd\s0\d	w	\fRWrite addressed lines at end of \fIfile\fR\fR\fR
xpand \fIcount\fR	x	\fRSynonym for \fIexpand\fR\fR\fR
yank \fIcount\fR	ya	\fRDefine lines to be \fIput\fR\fR
z \fItype count\fR	z	\fRContext display\fR\fR
! \fIcommand\fR	-	\fRSend \fIcommand\fR to a shell\fR\fR
=\fR\u\s-2\(dd\s0\d	-	\fRShow line number in buffer\fR\fR
> \fIcount\fR	-	\fRRight shift\fR\fR
< \fIcount\fR	-	\fRLeft shift\fR\fR
\s-2EOF\s0	-	\fRScroll (\s-2EOF\s0 is generated by \s-2CTRL\s0(D))\fR\fR
\s-2CR\s0 \fRor\fB \s-2NL\s0	\fB-	\fRNull command prints addressed (next) line\fR\fR
# \fIcount\fR	-	\fRSynonym for \fInumber\fR\fR\fR
: \fIcount\fR	-	\fRPrint inhibiting \fIlist\fR and \fInumber\fR options.\fR\fR
& \fIflags\fR \fIcount\fR	-	\fRRepeat last \fIsubstitute\fR command\fR\fR
\s+2\d~\u\s0 \fIflags\fR \fIcount\fR	-	\fRSubstitute last \fIrepl\fR for last pattern\fR\fR
|\fR	-	\fRMultiple command per line separator\fR\fR
_
.T&
lp-2 s s.
T{
\(dg \fIPat\fR may be delimited by other characters;
`\e/' and `\e&/' are also permitted as in address formation,
and with these forms
.I repl
is terminated by `/' in a
.I substitute .
T}
\(dd Default address is entire buffer (last line for `=').
.TE
.SH
Command variants
.PP
A number of command have variants,
introduced by following the command name with a `!'.
These variants are summarized in the following table.
.KS
.TS
center box;
c s
l | l
a | l.
Command variants
_
Variant	Description
_
\fBappend\fR \fI!\fR	Toggle \fIautoindent\fR during \fIappend\fR
\fBargs\fR \fI!\fR	Print all arguments, not just those remaining
\fBchange\fR \fI!\fR \fIcount\fR	Like \fIappend!\fR
\fBex\fR \fI!\fR \fIfile\fR	Suppress ``No write'' complaint before executing
\fBedit\fR \fI!\fR \fIfile\fR	Like \fIex!\fR
\fBglobal\fR \fI!\fR /\fIpat\fR/ \fIcmds\fR	Execute \fIcmds\fR on lines not matching \fIpat\fR
\fBinsert\fR \fI!\fR	Like \fIappend!\fR
\fBjoin\fR \fI!\fR \fIcount\fR	Join lines without massaging blank space
\fBnext\fR \fI!\fR	Like \fIex!\fR
\fBquit\fR \fI!\fR	Suppress ``More files'' and ``No write'' complaints
\fBtabulate\fR \fI!\fR \fIcount\fR	Convert all blanks to tabs, not just initial
\fBundo\fR \fI!\fR	No error if ``Nothing to undo'' or ``No change''
\fBwrite\fR \fI!\fR \fIfile\fR	Suppress \fIwrite\fR checks (i.e. overwrite file)
\fBwrite\fR \fI!\fR >> \fIfile\fR	Like \fIwrite!\fR (\fIfile\fR can be non-existent)
.TE
.KE
.bp
.tr *\(**