Reincorporate documentation lost with update to nvi 2.1.3

This commit is contained in:
bapt 2015-04-26 07:52:43 +00:00
parent 79580f1f18
commit 2a95d595d6
24 changed files with 17207 additions and 12 deletions

View File

@ -56,18 +56,6 @@ OLD_FILES+=usr/include/altq/altq_rmclass.h
OLD_FILES+=usr/include/altq/altq_cbq.h
OLD_FILES+=usr/include/altq/altq_rio.h
OLD_DIRS+=usr/include/altq
# 20150410
OLD_FILES+=usr/share/doc/usd/10.exref/paper.ascii.gz
OLD_FILES+=usr/share/doc/usd/10.exref/summary.ascii.gz
OLD_DIRS+=usr/share/doc/usd/10.exref
OLD_FILES+=usr/share/doc/usd/11.edit/paper.ascii.gz
OLD_DIRS+=usr/share/doc/usd/11.edit
OLD_FILES+=usr/share/doc/usd/12.vi/paper.ascii.gz
OLD_FILES+=usr/share/doc/usd/12.vi/summary.ascii.gz
OLD_FILES+=usr/share/doc/usd/12.vi/viapwh.ascii.gz
OLD_DIRS+=usr/share/doc/usd/12.vi
OLD_FILES+=usr/share/doc/usd/13.viref/paper.ascii.gz
OLD_DIRS+=usr/share/doc/usd/13.viref
# 20150329
.if ${TARGET_ARCH} == "arm"
OLD_FILES+=usr/include/bootconfig.h

View File

@ -0,0 +1,6 @@
# $FreeBSD$
SUBDIR= exref summary
.include <bsd.subdir.mk>

View File

@ -0,0 +1,4 @@
# $FreeBSD$
VOLUME= usd/10.exref
MACROS= -ms

View File

@ -0,0 +1,5 @@
# $FreeBSD$
SRCS= ex.rm
.include <bsd.doc.mk>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
# $FreeBSD$
DOC= summary
SRCS= ex.summary
USE_TBL=
.include <bsd.doc.mk>

View File

@ -0,0 +1,730 @@
.\" Copyright (c) 1980, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)ex.summary 8.3 (Berkeley) 8/18/96
.\"
.ds p \v'-0.2'.\v'+0.2'
.ds U \s-2UNIX\s+2
.ds c \v'-0.2':\v'+0.2'
.nr LL 6.5i
.lt 6.5i
.ll 6.5i
.ds CH
.ds LF Computing Services, U.C. Berkeley
.ds RF April 3, 1979
.de SP
.sp 1v
..
.nr PI 3n
.nr PD 0
.ND
.ps 12
.ft B
.ce 1
Ex/Edit Command Summary (Version 2.0)
.sp 1
.ft R
.nr VS 11
.nr PS 9
.2C
.PP
.I Ex
and
.I edit
are text editors, used for creating
and modifying files of text on the \*U
computer system.
.I Edit
is a variant of
.I ex
with features designed to
make it less complicated
to learn and use.
In terms of command syntax and effect
the editors are essentially identical,
and this command summary applies to both.
.PP
The summary is meant as a quick reference
for users already acquainted
with
.I edit
or \fIex\fP.
Fuller explanations of the editors are available
in the documents
.I
Edit: A Tutorial
.R
(a self-teaching introduction) and the
.I
Ex Reference Manual
.R
(the comprehensive reference source for
both \fIedit\fP and \fIex\fP).
Both of these writeups are available in the
Computing Services Library.
.PP
In the examples included with the
summary, commands and text entered by
the user are printed in \fBboldface\fR to
distinguish them from responses printed
by the computer.
.sp 0.45v
.LP
.B
The Editor Buffer
.PP
In order to perform its tasks
the editor sets aside a temporary
work space,
called a \fIbuffer\fR,
separate from the user's permanent
file.
Before starting to work on an existing
file the editor makes a copy of it in the
buffer, leaving the original untouched.
All editing changes are made to the
buffer copy, which must then
be written back to the permanent
file in order to update the
old version.
The buffer disappears
at the end of the editing session.
.sp 0.45v
.LP
.B
Editing: Command and Text Input Modes
.PP
.R
During an editing session there are
two usual modes of operation:
\fIcommand\fP mode and \fItext input\fP
mode.
(This disregards, for the moment,
.I open
and
.I visual
modes, discussed below.)
In command mode, the editor issues a
colon prompt (:)
to show that it is ready to
accept and execute a command.
In text input mode, on the other hand, there is
no prompt and the editor merely accepts text to
be added to the buffer.
Text input mode is initiated by the commands
\fIappend\fP, \fIinsert\fP, and \fIchange\fP,
and is terminated by typing a period as the
first and only character on a line.
.sp 0.45v
.LP
.B
Line Numbers and Command Syntax
.PP
.R
The editor keeps track of lines of text
in the buffer by numbering them consecutively
starting with 1 and renumbering
as lines are added or deleted.
At any given time the editor is positioned
at one of these lines; this position is
called the \fIcurrent line\fP.
Generally, commands that change the
contents of the buffer print the
new current line at the end of their
execution.
.PP
Most commands can be preceded by one or two
line-number addresses which indicate the lines
to be affected.
If one number is given the command operates on
that line only; if two, on an inclusive range
of lines.
Commands that can take line-number prefixes also
assume default prefixes if none are given.
The default assumed by each command is designed
to make it convenient to use in many instances
without any line-number prefix.
For the most part, a command used without a
prefix operates on the current line,
though exceptions to this rule should be noted.
The \fIprint\fP command
by itself, for instance, causes
one line, the current line, to be
printed at the terminal.
.PP
The summary shows the number of line addresses
that can be
prefixed to each command as well as
the defaults assumed if they are omitted.
For example,
.I (.,.)
means that up to 2 line-numbers may be given,
and that if none is given the
command operates on the current line.
(In the address prefix notation, ``.'' stands
for the current line and ``$'' stands for
the last line of the buffer.)
If no such notation appears, no
line-number prefix may be used.
.PP
Some commands take trailing
information;
only
the more important instances of this
are mentioned in the summary.
.sp 0.25v
.LP
.B
Open and Visual Modes
.PP
.R
Besides command and text input modes,
.I ex
and
.I edit
provide on some CRT terminals other modes of editing,
.I open
and
.I visual .
In these modes the cursor can
be moved to individual words
or characters in a line.
The commands then given are very different
from the standard editor commands; most do not appear on the screen when
typed.
.I
An Introduction to Display Editing with Vi
.R
provides a full discussion.
.sp 0.25v
.LP
.B
Special Characters
.PP
.R
.fi
Some characters take on special meanings
when used in context searches
and in patterns given to the \fIsubstitute\fP command.
For \fIedit\fR, these are ``^'' and ``$'',
meaning the beginning and end of a line,
respectively.
.I Ex
has the following additional special characters:
.B
.ce 1
\&. & * [ ] ~
.R
To use one of the special characters as its
simple graphic representation
rather than with its special meaning,
precede it by a backslash (\\).
The backslash always has a special meaning.
.1C
.TS
cp10 cp10 cp10 cp10
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
Name Abbr Description Examples
.sp 1.75
(.)\fBappend a T{
Begins text input mode,
adding lines to the buffer after
the line specified. Appending continues
until ``.'' is typed alone at the
beginning of a new line, followed by
a carriage return. \fI0a\fR places
lines at the beginning of the buffer.
T} T{
.nf
\fR:\fBa
Three lines of text
are added to the buffer
after the current line.
\*p
.R
\*c
.fi
T}
.SP
\fR(.,.)\fBchange c T{
Deletes indicated line(s) and
initiates text input mode to
replace them with new text which follows.
New text is terminated the same way
as with \fIappend\fR.
T} T{
.nf
:\fB5,6c
Lines 5 and 6 are
deleted and replaced by
these three lines.
\*p
.R
\*c
.fi
T}
.SP
\fR(.,.)\fBcopy \fIaddr co T{
Places a copy of the specified lines
after the line indicated by \fIaddr\fR.
The example places a copy of lines 8 through
12, inclusive, after line 25.
T} T{
.nf
\fR:\fB8,12co 25
\fRLast line copied is printed
\fR\*c
.fi
T}
.SP
\fR(.,.)\fBdelete d T{
Removes lines from the buffer
and prints the current line after the deletion.
T} T{
.nf
\fR:\fB13,15d
\fRNew current line is printed
\*c
.fi
T}
.TE
.sp 0.5v
.TS
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
T{
\fBedit \fIfile\fP
.br
\fBedit! \fIfile\fP
T} T{
e
.br
e!
T} T{
.fi
\fRClears the editor buffer and then
copies into it the named \fIfile\fR,
which becomes the current file.
This is a way of shifting to a different
file
without leaving the editor.
The editor issues a warning
message if this command is used before
saving changes
made to the file already in the buffer;
using the form \fBe!\fR overrides this protective mechanism.
T} T{
.nf
\fR:\fBe ch10\fR
No write since last change
:\fBe! ch10\fR
"ch10" 3 lines, 62 characters
\*c
.fi
T}
.SP
\fBfile \fIname\fR f T{
\fRIf followed by a \fIname\fR, renames
the current file to \fIname\fR.
If used without \fIname\fR, prints
the name of the current file.
T} T{
.nf
\fR:\fBf ch9
\fR"ch9" [Modified] 3 lines ...
:\fBf
\fR"ch9" [Modified] 3 lines ...
\*c
.fi
T}
.SP
(1,$)\fBglobal g \fBglobal/\fIpattern\fB/\fIcommands T{
.nf
:\fBg/nonsense/d
\fR\*c
.fi
T}
\fR(1,$)\fBglobal! g!\fR or \fBv T{
Searches the entire buffer (unless a smaller
range is specified by line-number prefixes) and
executes \fIcommands\fR on every line with
an expression matching \fIpattern\fR.
The second form, abbreviated
either \fBg!\fR or \fBv\fR,
executes \fIcommands\fR on lines that \fIdo
not\fR contain the expression \fIpattern\fR.
T} \^
.SP
\fR(.)\fBinsert i T{
Inserts new lines of text immediately before the specified line.
Differs from
.I append
only in that text is placed before, rather than after, the indicated line.
In other words, \fB1i\fR has the same effect as \fB0a\fR.
T} T{
.nf
:\fB1i
These lines of text will
be added prior to line 1.
\&.
\fR:
.fi
T}
.SP
\fR(.,.+1)\fBjoin j T{
Join lines together, adjusting white space (spaces
and tabs) as necessary.
T} T{
.nf
:\fB2,5j\fR
Resulting line is printed
:
.fi
T}
.TE
.bp
.TS
cp10 cp10 cp10 cp10
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
Name Abbr Description Examples
.sp 1.75
\fR(.,.)\fBlist l T{
\fRPrints lines in a more
unambiguous way than the \fIprint\fR
command does. The end of a line,
for example, is marked with a ``$'',
and tabs printed as ``^I''.
T} T{
.nf
:\fB9l
\fRThis is line 9$
\*c
.fi
T}
.TE
.sp 0.5v
.TS
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
\fR(.,.)\fBmove \fIaddr\fB m T{
\fRMoves the specified lines
to a position after the line
indicated by \fIaddr\fR.
T} T{
.nf
\fR:\fB12,15m 25\fR
New current line is printed
\*c
.fi
T}
.SP
\fR(.,.)\fBnumber nu T{
Prints each line preceded
by its buffer line number.
T} T{
.nf
\fR:\fBnu
\0\0\fR10\0 This is line 10
\*c
.fi
T}
.SP
\fR(.)\fBopen o T{
Too involved to discuss here,
but if you enter open mode
accidentally, press
the \s-2ESC\s0 key followed by
\fBq\fR to
get back into normal editor
command mode.
\fIEdit\fP is designed to
prevent accidental use of
the open command.
T}
.SP
\fBpreserve pre T{
Saves a copy of the current buffer contents as though the system had
just crashed. This is for use in an emergency when a
.I write
command has failed and you don't know how else to save your work.\(dg
T} T{
.nf
:\fBpreserve\fR
File preserved.
:
.fi
T}
.SP
\fR(.,.)\fBprint p Prints the text of line(s). T{
.nf
:\fB+2,+3p\fR
The second and third lines
after the current line
:
.fi
T}
.TE
.FS
.ll 6.5i
\(dg You should seek assistance from a system administrator as soon as
possible after saving a file with the
.I preserve
command, because the preserved copy of the file is saved in a
directory used to store temporary files, and thus, the preserved
copy may only be available for a short period of time.
.FE
.SP
.nf
.TS
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
T{
.nf
\fBquit
quit!
.fi
T} T{
.nf
q
q!
T} T{
.fi
\fREnds the editing session.
You will receive a
warning if you have changed the buffer
since last writing its contents
to the file. In this event you
must either type \fBw\fR to write,
or type \fBq!\fR to exit from
the editor without saving your changes.
T} T{
.nf
\fR:\fBq
\fRNo write since last change
:\fBq!
\fR%
.fi
T}
.SP
\fR(.)\fBread \fIfile\fP r T{
.fi
\fRPlaces a copy of \fIfile\fR in the
buffer after the specified line.
Address 0 is permissible and causes
the copy of \fIfile\fR to be placed
at the beginning of the buffer.
The \fIread\fP command does not
erase any text already in the buffer.
If no line number is specified,
\fIfile\fR is placed after the
current line.
T} T{
.nf
\fR:\fB0r newfile
\fR"newfile" 5 lines, 86 characters
\*c
.fi
T}
.SP
\fBrecover \fIfile\fP rec T{
.fi
Retrieves a copy of the editor buffer
after a system crash, editor crash,
phone line disconnection, or
\fIpreserve\fR command.
T}
.SP
\fR(.,.)\fBsubstitute s T{
.nf
\fBsubstitute/\fIpattern\fB/\fIreplacement\fB/
substitute/\fIpattern\fB/\fIreplacement\fB/gc
.fi
\fRReplaces the first occurrence of \fIpattern\fR
on a line
with \fIreplacement\fP.
Including a \fBg\fR after the command
changes all occurrences of \fIpattern\fP
on the line.
The \fBc\fR option allows the user to
confirm each substitution before it is
made; see the manual for details.
T} T{
.nf
:\fB3p
\fRLine 3 contains a misstake
:\fBs/misstake/mistake/
\fRLine 3 contains a mistake
\*c
.fi
T}
.TE
.bp
.TS
cp10 cp10 cp10 cp10
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
Name Abbr Description Examples
.sp 1.75
\fBundo u T{
.fi
\fRReverses the changes made in
the buffer by the last buffer-editing
command.
Note that this example contains
a notification about the number of
lines affected.
T} T{
.nf
\fR:\fB1,15d
\fR15 lines deleted
new line number 1 is printed
:\fBu
\fR15 more lines in file ...
old line number 1 is printed
\*c
.fi
T}
.SP
\fR(1,$)\fBwrite \fIfile\fR w T{
.fi
\fRCopies data from the buffer onto
a permanent file. If no \fIfile\fR
is named, the current filename
is used.
The file is automatically created
if it does not yet exist.
A response containing the number of
lines and characters in the file
indicates that the write
has been completed successfully.
The editor's built-in protections
against overwriting existing files
will in some circumstances
inhibit a write.
The form \fBw!\fR forces the
write, confirming that
an existing file is to be overwritten.
T} T{
.nf
\fR:\fBw
\fR"file7" 64 lines, 1122 characters
:\fBw file8
\fR"file8" File exists ...
:\fBw! file8
\fR"file8" 64 lines, 1122 characters
\*c
.fi
T}
\fR(1,$)\fBwrite! \fIfile\fP w! \^ \^
.TE
.sp 0.5v
.TS
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
\fR(.)\fBz \fIcount\fP z T{
.fi
\fRPrints a screen full of text starting
with the line indicated;
or, if \fIcount\fR is specified,
prints that number of lines.
Variants of the \fIz\fR command
are described in the manual.
T}
.SP
\fB!\fIcommand T{
.fi
Executes the remainder of the line
after \fB!\fR as a \*U command.
The buffer is unchanged by this, and
control is returned to the editor when
the execution of \fIcommand\fR is complete.
T} T{
.nf
\fR:\fB!date
\fRFri Jun 9 12:15:11 PDT 1978
!
\*c
.fi
T}
.SP
\fRcontrol-d T{
.fi
Prints the next \fIscroll\fR of text,
normally half of a screen. See the
manual for details of the \fIscroll\fR
option.
T}
.SP
\fR(.+1)<cr> T{
.fi
An address alone followed by a carriage
return causes the line to be printed.
A carriage return by itself prints the
line following the current line.
T} T{
.nf
:\fR<cr>
the line after the current line
\*c
.fi
T}
.TE
.sp 0.5v
.TS
ltw(1.0i) lt2w(0.40i)fB ltw(3.0i) ltw(1.8i).
\fB/\fIpattern\fB/ T{
.fi
\fRSearches for the next line in which
\fIpattern\fR occurs and prints it.
T} T{
.nf
\fR:\fB/This pattern/
\fRThis pattern next occurs here.
\*c
.fi
T}
.SP
\fB// T{
Repeats the most recent search.
T} T{
.nf
\fR:\fB//
\fRThis pattern also occurs here.
\*c
.fi
T}
.SP
\fB?\fIpattern\fB? T{
Searches in the reverse direction
for \fIpattern\fP.
T}
.SP
\fB?? T{
Repeats the most recent search,
moving in the reverse direction
through the buffer.
T}
.TE

View File

@ -0,0 +1,17 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/8/93
# $FreeBSD$
VOLUME= usd/11.edit
SRCS= edittut.ms
MACROS= -ms
USE_TBL=
# index for versatec is different from the one in edit.tut
# because the fonts are different and entries reference page
# rather than section numbers. if you have a typesetter
# you should just use the index in edit.tut, and ignore editvindex.
#editvindex:
# ${TROFF} ${MACROS} -n22 edit.vindex
.include <bsd.doc.mk>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
# $FreeBSD$
SUBDIR= vi viapwh summary
.include <bsd.subdir.mk>

View File

@ -0,0 +1,4 @@
# $FreeBSD$
VOLUME= usd/12.vi
MACROS= -ms

View File

@ -0,0 +1,7 @@
# $FreeBSD$
DOC= summary
SRCS= vi.summary
USE_TBL=
.include <bsd.doc.mk>

View File

@ -0,0 +1,468 @@
.\" Copyright (c) 1980, 1993
.\" The Regents of the University of California. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the University of
.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" @(#)vi.summary 8.3 (Berkeley) 8/18/96
.\"
.ds CH
.ds CF
.de TS
.br
.if !\\n(1T .RT
.ul 0
.ti \\n(.iu
.if t .sp 0.25
.if n .sp
.if \\$1H .TQ
.nr IX 1
..
.nr PS 9
.ps 9
.nr VS 11
.vs 11
.nr HM .50i
.nr FM .25i
.nr PO 1.0i
.po 1.0i
.nr LL 4.5i
.ll 4.5i
.de nc
.bp
..
.de h
.LG
.B
\\$1
.R
.NL
..
.LG
.LG
.B
.ce
Ex Quick Reference
.R
.NL
.LP
.LP
.h "Entering/leaving ex"
.TS
aw(1.4i)b aw(1.8i).
% ex \fIname\fP edit \fIname\fP, start at end
% ex +\fIn\fP \fIname\fP ... at line \fIn\fP
% ex \-t \fItag\fP start at \fItag\fP
% ex \-r list saved files
% ex \-r \fIname\fP recover file \fIname\fP
% ex \fIname\fP ... edit first; rest via \fB:n\fP
% ex \-R \fIname\fP read only mode
: x exit, saving changes
: q! exit, discarding changes
.TE
.h "Ex states"
.TS
lw(1i) lw(2.0i).
Command T{
Normal and initial state. Input prompted for by \fB:\fP.
Your kill character cancels partial command.
T}
Insert T{
Entered by \fBa\fP \fBi\fP and \fBc\fP.
Arbitrary text then terminates with line having only \fB.\fP
character on it or abnormally with interrupt.
T}
Open/visual T{
Entered by \fBopen\fP or \fBvi\fP, terminates with \fBQ\fP
or ^\e.
T}
.TE
.h "Ex commands"
.TS
lw(.45i) lw(.08i)b lw(.45i) lw(.08i)b lw(.45i) lw(.08i)b.
abbrev ab next n unabbrev una
append a number nu undo u
args ar open o unmap unm
change c preserve pre version ve
copy co print p visual vi
delete d put pu write w
edit e quit q xit x
file f read re yank ya
global g recover rec \fIwindow\fP z
insert i rewind rew \fIescape\fP !
join j set se \fIlshift\fP <
list l shell sh \fIprint next\fP \fRCR\fP
map source so \fIresubst\fP &
mark ma stop st \fIrshift\fP >
move m substitute s \fIscroll\fP ^D
.TE
.h "Ex command addresses"
.TS
lw(.3i)b lw(0.8i) lw(.3i)b lw(0.8i).
\fIn\fP line \fIn\fP /\fIpat\fP next with \fIpat\fP
\&. current ?\fIpat\fP previous with \fIpat\fP
$ last \fIx\fP-\fIn\fP \fIn\fP before \fIx\fP
+ next \fIx\fP,\fIy\fP \fIx\fP through \fIy\fP
\- previous \(aa\fIx\fP marked with \fIx\fP
+\fIn\fP \fIn\fP forward \(aa\(aa previous context
% 1,$
.TE
.nc
.h "Specifying terminal type"
.TS
aw(1.7i)b aw(1.5i).
% setenv TERM \fItype\fP \fIcsh\fP and all version 6
$ TERM=\fItype\fP; export TERM \fIsh\fP in Version 7
See also \fItset\fR(1)
.TE
.h "Some terminal types"
.TS
lw(.4i) lw(.4i) lw(.4i) lw(.4i) lw(.4i).
2621 43 adm31 dw1 h19
2645 733 adm3a dw2 i100
300s 745 c100 gt40 mime
33 act4 dm1520 gt42 owl
37 act5 dm2500 h1500 t1061
4014 adm3 dm3025 h1510 vt52
.TE
.h "Initializing options"
.TS
lw(.9i)b aw(1.5i).
EXINIT place \fBset\fP's here in environment var.
set \fIx\fP enable option
set no\fIx\fP disable option
set \fIx\fP=\fIval\fP give value \fIval\fP
set show changed options
set all show all options
set \fIx\fP? show value of option \fIx\fP
.TE
.h "Useful options"
.TS
lw(.9i)b lw(.3i) lw(1.0i).
autoindent ai supply indent
autowrite aw write before changing files
ignorecase ic in scanning
lisp \fB( ) { }\fP are s-exp's
list print ^I for tab, $ at end
magic \fB. [ *\fP special in patterns
number nu number lines
paragraphs para macro names which start ...
redraw simulate smart terminal
scroll command mode lines
sections sect macro names ...
shiftwidth sw for \fB< >\fP, and input \fB^D\fP
showmatch sm to \fB)\fP and \fB}\fP as typed
slowopen slow choke updates during insert
window visual mode lines
wrapscan ws around end of buffer?
wrapmargin wm automatic line splitting
.TE
.LP
.h "Scanning pattern formation"
.TS
aw(.9i)b aw(1.0i).
\(ua beginning of line
$ end of line
\fB.\fR any character
\e< beginning of word
\e> end of word
[\fIstr\fP] any char in \fIstr\fP
[\(ua\fIstr\fP] ... not in \fIstr\fP
[\fIx\-y\fP] ... between \fIx\fP and \fIy\fP
* any number of preceding
.TE
.nc
.LP
.LG
.LG
.B
.ce
Vi Quick Reference
.NL
.R
.LP
.LP
.h "Entering/leaving vi"
.TS
aw(1.4i)b aw(1.8i).
% vi \fIname\fP edit \fIname\fP at top
% vi +\fIn\fP \fIname\fP ... at line \fIn\fP
% vi + \fIname\fP ... at end
% vi \-r list saved files
% vi \-r \fIname\fP recover file \fIname\fP
% vi \fIname\fP ... edit first; rest via \fB:n\fP
% vi \-t \fItag\fP start at \fItag\fP
% vi +/\fIpat\fP \fIname\fP search for \fIpat\fP
% view \fIname\fP read only mode
ZZ exit from vi, saving changes
^Z stop vi for later resumption
.TE
.h "The display"
.TS
lw(.75i) lw(2.2i).
Last line T{
Error messages, echoing input to \fB: / ?\fP and \fB!\fR,
feedback about i/o and large changes.
T}
@ lines On screen only, not in file.
~ lines Lines past end of file.
^\fIx\fP Control characters, ^? is delete.
tabs Expand to spaces, cursor at last.
.TE
.LP
.h "Vi states"
.TS
lw(.75i) lw(2.2i).
Command T{
Normal and initial state. Others return here.
ESC (escape) cancels partial command.
T}
Insert T{
Entered by \fBa i A I o O c C s S\fP \fBR\fP.
Arbitrary text then terminates with ESC character,
or abnormally with interrupt.
T}
Last line T{
Reading input for \fB: / ?\fP or \fB!\fP; terminate
with ESC or CR to execute, interrupt to cancel.
T}
.TE
.h "Counts before vi commands"
.TS
lw(1.5i) lw(1.7i)b.
line/column number z G |
scroll amount ^D ^U
replicate insert a i A I
repeat effect \fRmost rest\fP
.TE
.h "Simple commands"
.TS
lw(1.5i)b lw(1.7i).
dw delete a word
de ... leaving punctuation
dd delete a line
3dd ... 3 lines
i\fItext\fP\fRESC\fP insert text \fIabc\fP
cw\fInew\fP\fRESC\fP change word to \fInew\fP
ea\fIs\fP\fRESC\fP pluralize word
xp transpose characters
.TE
.nc
.h "Interrupting, cancelling"
.TS
aw(0.75i)b aw(1.6i).
ESC end insert or incomplete cmd
^? (delete or rubout) interrupts
^L reprint screen if \fB^?\fR scrambles it
.TE
.h "File manipulation"
.TS
aw(0.75i)b aw(1.6i).
:w write back changes
:wq write and quit
:q quit
:q! quit, discard changes
:e \fIname\fP edit file \fIname\fP
:e! reedit, discard changes
:e + \fIname\fP edit, starting at end
:e +\fIn\fR edit starting at line \fIn\fR
:e # edit alternate file
^\(ua synonym for \fB:e #\fP
:w \fIname\fP write file \fIname\fP
:w! \fIname\fP overwrite file \fIname\fP
:sh run shell, then return
:!\fIcmd\fP run \fIcmd\fR, then return
:n edit next file in arglist
:n \fIargs\fP specify new arglist
:f show current file and line
^G synonym for \fB:f\fP
:ta \fItag\fP to tag file entry \fItag\fP
^] \fB:ta\fP, following word is \fItag\fP
.TE
.h "Positioning within file"
.TS
aw(0.75i)b aw(1.6i).
^F forward screenfull
^B backward screenfull
^D scroll down half screen
^U scroll up half screen
G goto line (end default)
/\fIpat\fR next line matching \fIpat\fR
?\fIpat\fR prev line matching \fIpat\fR
n repeat last \fB/\fR or \fB?\fR
N reverse last \fB/\fR or \fB?\fR
/\fIpat\fP/+\fIn\fP n'th line after \fIpat\fR
?\fIpat\fP?\-\fIn\fP n'th line before \fIpat\fR
]] next section/function
[[ previous section/function
% find matching \fB( ) {\fP or \fB}\fP
.TE
.h "Adjusting the screen"
.TS
aw(0.75i)b aw(1.6i).
^L clear and redraw
^R retype, eliminate @ lines
z\fRCR\fP redraw, current at window top
z\- ... at bottom
z\|. ... at center
/\fIpat\fP/z\- \fIpat\fP line at bottom
z\fIn\fP\|. use \fIn\fP line window
^E scroll window down 1 line
^Y scroll window up 1 line
.TE
.nc
.h "Marking and returning
.TS
aw(0.5i)b aw(2.0i).
\(ga\(ga previous context
\(aa\(aa ... at first non-white in line
m\fIx\fP mark position with letter \fIx\fP
\(ga\fIx\fP to mark \fIx\fP
\(aa\fIx\fP ... at first non-white in line
.TE
.h "Line positioning"
.TS
aw(0.5i)b aw(2.0i).
H home window line
L last window line
M middle window line
+ next line, at first non-white
\- previous line, at first non-white
\fRCR\fP return, same as +
\(da \fRor\fP j next line, same column
\(ua \fRor\fP k previous line, same column
.TE
.h "Character positioning"
.TS
aw(0.5i)b aw(2.0i).
\(ua first non white
0 beginning of line
$ end of line
h \fRor\fP \(-> forward
l \fRor\fP \(<- backwards
^H same as \fB\(<-\fP
\fRspace\fP same as \fB\(->\fP
f\fIx\fP find \fIx\fP forward
F\fIx\fP \fBf\fR backward
t\fIx\fP upto \fIx\fP forward
T\fIx\fP back upto \fIx\fP
; repeat last \fBf F t\fP or \fBT\fP
, inverse of \fB;\fP
| to specified column
% find matching \fB( { )\fP or \fB}\fR
.TE
.h "Words, sentences, paragraphs"
.TS
aw(0.5i)b aw(2.0i).
w word forward
b back word
e end of word
) to next sentence
} to next paragraph
( back sentence
{ back paragraph
W blank delimited word
B back \fBW\fP
E to end of \fBW\fP
.TE
.h "Commands for \s-2LISP\s0"
.TS
aw(0.5i)b aw(2.0i).
) Forward s-expression
} ... but don't stop at atoms
( Back s-expression
{ ... but don't stop at atoms
.TE
.nc
.h "Corrections during insert"
.TS
aw(.5i)b aw(2.0i).
^H erase last character
^W erases last word
\fRerase\fP your erase, same as \fB^H\fP
\fRkill\fP your kill, erase input this line
\e escapes \fB^H\fR, your erase and kill
\fRESC\fP ends insertion, back to command
^? interrupt, terminates insert
^D backtab over \fIautoindent\fP
\(ua^D kill \fIautoindent\fP, save for next
0^D ... but at margin next also
^V quote non-printing character
.TE
.h "Insert and replace"
.TS
aw(.5i)b aw(2.0i).
a append after cursor
i insert before
A append at end of line
I insert before first non-blank
o open line below
O open above
r\fIx\fP replace single char with \fIx\fP
R replace characters
.TE
.h "Operators (double to affect lines)"
.TS
aw(0.5i)b aw(2.0i).
d delete
c change
< left shift
> right shift
! filter through command
\&= indent for \s-2LISP\s0
y yank lines to buffer
.TE
.h "Miscellaneous operations"
.TS
aw(0.5i)b aw(2.0i).
C change rest of line
D delete rest of line
s substitute chars
S substitute lines
J join lines
x delete characters
X ... before cursor
Y yank lines
.TE
.h "Yank and put"
.TS
aw(0.5i)b aw(2.0i).
p put back lines
P put before
"\fIx\fPp put from buffer \fIx\fP
"\fIx\fPy yank to buffer \fIx\fP
"\fIx\fPd delete into buffer \fIx\fP
.TE
.h "Undo, redo, retrieve"
.TS
aw(0.5i)b aw(2.0i).
u undo last change
U restore current line
\fB.\fP repeat last change
"\fId\fP\|p retrieve \fId\fP'th last delete
.TE

View File

@ -0,0 +1,6 @@
# $FreeBSD$
SRCS= vi.in vi.chars
USE_TBL=
.include <bsd.doc.mk>

2074
share/doc/usd/12.vi/vi/vi.in Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
# $FreeBSD$
DOC= viapwh
SRCS= vi.apwh.ms
.include <bsd.doc.mk>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
# From: @(#)Makefile 8.16 (Berkeley) 8/15/94
# $FreeBSD$
VOLUME= usd/13.viref
SRCS= vi.ref-patched
EXTRA= ex.cmd.roff ref.so set.opt.roff vi.cmd.roff
MACROS= -me
CLEANFILES= vi.ref-patched index
TRFLAGS= -U # this is to hide warnings only
USE_SOELIM=
USE_TBL=
vi.ref-patched: vi.ref
sed -e 's:^\.so index.so$$:&.\\*[.T]:' ${.ALLSRC} > ${.TARGET}
PRINTERDEVICE?= ascii
.for _dev in ${PRINTERDEVICE}
EXTRA+= index.so.${_dev}
CLEANFILES+= index.so.${_dev}
# Build index.so as a side-effect of building the paper.
index.so.${_dev}: ${SRCS} ${EXTRA:Nindex.so.${_dev}}
sed -e 's:^\.so index\.so\.\\\*\[\.T\]$$::' vi.ref-patched | \
${ROFF.${_dev}} -U -z
sed -e 's/MINUSSIGN/-/' \
-e 's/DOUBLEQUOTE/""/' \
-e "s/SQUOTE/'/" \
-e 's/ /__SPACE/g' < index | \
sort -u '-t ' -k 1,1 -k 2n | awk -f ${SRCDIR}/merge.awk | \
sed -e 's/__SPACE/ /g' \
-e "s/^\\(['\\.]\\)/\\\\\&\\1/" > ${.TARGET}
.endfor
.include <bsd.doc.mk>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,103 @@
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
.\" Copyright (c) 1994, 1995, 1996
.\" Keith Bostic. All rights reserved.
.\"
.\" See the LICENSE file for redistribution information.
.\"
.\" @(#)ref.so 8.9 (Berkeley) 8/17/96
.\"
.\"
.\" indented paragraph, with spaces between the items, bold font
.de IP
.\".tm arg 1 \\$1 arg 2 \\$2 arg 3 \\$3
.sp 1
.nr PS \\n(ps
.nr ps 0
.ip "\fB\\$1\fP" \\$2
.nr ps \\n(PS
.br
..
.\" indented paragraph, no spaces between the items, bold font
.de Ip
.\".tm arg 1 \\$1 arg 2 \\$2 arg 3 \\$3
.nr PS \\n(ps
.nr ps 0
.ns
.ip "\fB\\$1\fP" \\$2
.nr ps \\n(PS
.br
..
.\" start nested .IP
.de SS
.sp
.ba +5n
..
.\" end nested .IP
.de SE
.ba -5n
..
.\" nested .IP, no spaces, normal font
.de SP
.\".tm arg 1 \\$1 arg 2 \\$2 arg 3 \\$3
.nr PS \\n(ps
.nr ps 0
.ns
.ip "\\$1" 9n
.nr ps \\n(PS
..
.\" typewriter font
.de LI
\&\fC\\$1\fP\\$2
..
.\" ex/vi names in command font
.de EV
\&\fB\\$1\fP/\fB\\$2\fP\\$3
..
.\" command names
.de CO
\&\fB\\$1\fP\\$2
..
.\" key words for index
.de KY
.sy echo >>index '\\$1 \\n%'
..
.\" option names
.de OP
\&\fB\\$1\fP\\$2
..
.\" paren quoted (typewriter font)
.de PQ
(\*(lq\fC\\$1\fP\*(rq)\\$2
..
.\" quoted bold
.de QB
\*(lq\fB\\$1\fP\*(rq\\$2
..
.\" quoted command
.de QC
\*(lq\fB\\$1\fP\*(rq\\$2
..
.\" quoted option
.de QO
\*(lq\fB\\$1\fP\*(rq\\$2
..
.\" quoted (no font change)
.de QQ
\*(lq\\$1\*(rq\\$2
..
.\" quoted (typewriter font)
.de QT
\*(lq\fC\\$1\fP\*(rq\\$2
..
.\" section macro to build TOC
.de SH
.(x
\\$2
.)x
.sh \\$1 "\\$2"
..
.\" manual section
.de XR
\&\fI\\$1\fP(\\$2)\\$3
..

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,10 @@ SUBDIR= title \
05.dc \
06.bc \
07.mail \
10.exref \
11.vitut \
12.vi \
13.viref \
18.msdiffs \
19.memacros \
20.meref \