BSD 4_4_Lite2 release
[unix-history] / usr / src / usr.bin / ex / USD.doc / vitut / vi.in
index 56dacfc..65535eb 100644 (file)
@@ -1,12 +1,38 @@
-.\" Copyright (c) 1980 The Regents of the University of California.
-.\" All rights reserved.
+.\" Copyright (c) 1980, 1993
+.\"    The Regents of the University of California.  All rights reserved.
 .\"
 .\"
-.\" %sccs.include.redist.roff%
+.\" 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.
 .\"
 .\"
-.\"    @(#)vi.in       6.3 (Berkeley) %G%
+.\" 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.
 .\"
 .\"
-.EH 'USD:15-%''An Introduction to Display Editing with Vi'
-.OH 'An Introduction to Display Editing with Vi''USD:15-%'
+.\"    @(#)vi.in       8.3 (Berkeley) 5/23/94
+.\"
+.EH 'USD:11-%''An Introduction to Display Editing with Vi'
+.OH 'An Introduction to Display Editing with Vi''USD:11-%'
 .bd S 3
 .if t .ds dg \(dg
 .if n .ds dg +
 .bd S 3
 .if t .ds dg \(dg
 .if n .ds dg +
@@ -560,6 +586,7 @@ This will set the
 .I readonly
 option which will prevent you from
 accidently overwriting the file.
 .I readonly
 option which will prevent you from
 accidently overwriting the file.
+.sp
 .NH 1
 Making simple changes
 .NH 2
 .NH 1
 Making simple changes
 .NH 2
@@ -638,6 +665,7 @@ you can't backspace around the end of a line.  If you need to back up
 to the previous line to make a correction, just hit \s-2ESC\s0 and move
 the cursor back to the previous line.  After making the correction you
 can return to where you were and use the insert or append command again.
 to the previous line to make a correction, just hit \s-2ESC\s0 and move
 the cursor back to the previous line.  After making the correction you
 can return to where you were and use the insert or append command again.
+.sp .5
 .NH 2
 Making small corrections
 .PP
 .NH 2
 Making small corrections
 .PP
@@ -694,6 +722,7 @@ Find a word which you can change to another, and try this
 now.
 Notice that the end of the text to be changed was marked with the character
 `$' so that you can see this as you are typing in the new material.
 now.
 Notice that the end of the text to be changed was marked with the character
 `$' so that you can see this as you are typing in the new material.
+.sp .5
 .NH 2
 Operating on lines
 .PP
 .NH 2
 Operating on lines
 .PP
@@ -974,6 +1003,7 @@ F\fIx\fR   f backward in line
 P      put text back, before cursor or above current line
 T\fIx\fR       t backward in line
 .TE
 P      put text back, before cursor or above current line
 T\fIx\fR       t backward in line
 .TE
+.ne 1i
 .NH 1
 High level commands
 .NH 2
 .NH 1
 High level commands
 .NH 2
@@ -1141,6 +1171,18 @@ Options, set, and editor startup files
 .PP
 The editor has a set of options, some of which have been mentioned above.
 The most useful options are given in the following table.
 .PP
 The editor has a set of options, some of which have been mentioned above.
 The most useful options are given in the following table.
+.PP
+The options are of three kinds:  numeric options, string options, and
+toggle options.  You can set numeric and string options by a statement
+of the form
+.DS
+\fBset\fR \fIopt\fR\fB=\fR\fIval\fR
+.DE
+and toggle options can be set or unset by statements of one of the forms
+.DS
+\fBset\fR \fIopt\fR
+\fBset\fR \fBno\fR\fIopt\fR
+.DE
 .KF
 .TS
 lb lb lb lb
 .KF
 .TS
 lb lb lb lb
@@ -1163,18 +1205,6 @@ slowopen slow    Postpone display updates during inserts
 term   dumb    The kind of terminal you are using.
 .TE
 .KE
 term   dumb    The kind of terminal you are using.
 .TE
 .KE
-.PP
-The options are of three kinds:  numeric options, string options, and
-toggle options.  You can set numeric and string options by a statement
-of the form
-.DS
-\fBset\fR \fIopt\fR\fB=\fR\fIval\fR
-.DE
-and toggle options can be set or unset by statements of one of the forms
-.DS
-\fBset\fR \fIopt\fR
-\fBset\fR \fBno\fR\fIopt\fR
-.DE
 These statements can be placed in your EXINIT in your environment,
 or given while you are running
 .I vi
 These statements can be placed in your EXINIT in your environment,
 or given while you are running
 .I vi
@@ -1732,6 +1762,7 @@ If you make changes to the editor's copy of a file, but do not wish to
 write them back, then you must give an \fB!\fR after the command you
 would otherwise use; this forces the editor to discard any changes
 you have made.  Use this carefully.
 write them back, then you must give an \fB!\fR after the command you
 would otherwise use; this forces the editor to discard any changes
 you have made.  Use this carefully.
+.ne 1i
 .PP
 The \fB:e\fR command can be given a \fB+\fR argument to start at the
 end of the file, or a \fB+\fR\fIn\fR argument to start at line \fIn\fR\^.
 .PP
 The \fB:e\fR command can be given a \fB+\fR argument to start at the
 end of the file, or a \fB+\fR\fIn\fR argument to start at line \fIn\fR\^.
@@ -1793,6 +1824,7 @@ to the line which matches.
 You can have the editor ignore the case of words in the searches it does
 by giving the command \fB:se ic\fR\s-2CR\s0.
 The command \fB:se noic\fR\s-2CR\s0 turns this off.
 You can have the editor ignore the case of words in the searches it does
 by giving the command \fB:se ic\fR\s-2CR\s0.
 The command \fB:se noic\fR\s-2CR\s0 turns this off.
+.ne 1i
 .PP
 Strings given to searches may actually be regular expressions.
 If you do not want or need this facility, you should
 .PP
 Strings given to searches may actually be regular expressions.
 If you do not want or need this facility, you should
@@ -1830,6 +1862,7 @@ More about input mode
 .PP
 There are a number of characters which you can use to make corrections
 during input mode.  These are summarized in the following table.
 .PP
 There are a number of characters which you can use to make corrections
 during input mode.  These are summarized in the following table.
+.sp .5
 .DS
 .TS
 lb l.
 .DS
 .TS
 lb l.
@@ -1847,6 +1880,7 @@ kill      your kill character, deletes the input on this line
 ^V     quotes the next non-printing character into the file
 .TE
 .DE
 ^V     quotes the next non-printing character into the file
 .TE
 .DE
+.sp .5
 .PP
 The most usual way of making corrections to input is by typing \fB^H\fR
 to correct a single character, or by typing one or more \fB^W\fR's to
 .PP
 The most usual way of making corrections to input is by typing \fB^H\fR
 to correct a single character, or by typing one or more \fB^W\fR's to