diff options
Diffstat (limited to 'usr.bin/vi/docs/USD.doc/vitut/vi.in')
-rw-r--r-- | usr.bin/vi/docs/USD.doc/vitut/vi.in | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/usr.bin/vi/docs/USD.doc/vitut/vi.in b/usr.bin/vi/docs/USD.doc/vitut/vi.in index 3bdfeb95b65..9815e6d3c8a 100644 --- a/usr.bin/vi/docs/USD.doc/vitut/vi.in +++ b/usr.bin/vi/docs/USD.doc/vitut/vi.in @@ -29,10 +29,10 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" @(#)vi.in 8.1 (Berkeley) 6/8/93 +.\" @(#)vi.in 8.4 (Berkeley) 6/27/96 .\" -.EH 'USD:12-%''An Introduction to Display Editing with Vi' -.OH 'An Introduction to Display Editing with Vi''USD:12-%' +.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 + @@ -586,6 +586,7 @@ This will set the .I readonly option which will prevent you from accidently overwriting the file. +.sp .NH 1 Making simple changes .NH 2 @@ -664,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. +.sp .5 .NH 2 Making small corrections .PP @@ -720,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. +.sp .5 .NH 2 Operating on lines .PP @@ -1000,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 +.ne 1i .NH 1 High level commands .NH 2 @@ -1167,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 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 @@ -1189,18 +1205,6 @@ slowopen slow Postpone display updates during inserts 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 @@ -1487,7 +1491,7 @@ command from .I EXINIT ) with a command of the form: .DS -:map \fIlhs\fR \fIrhs\fR\s-2CR\f0 +:map \fIlhs\fR \fIrhs\fR\s-2CR .DE mapping .I lhs @@ -1758,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. +.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\^. @@ -1810,7 +1815,7 @@ of the string. If you are using an operator such as \fBd\fR, \fBc\fR or \fBy\fR, then you may well wish to affect lines up to the line before the line containing the pattern. You can give a search of the form \fB/\fR\fIpat\fR\fB/\-\fR\fIn\fR to refer to the \fIn\fR'th line -before the next line containing \fIpat\fR, or you can use \fB\+\fR instead +before the next line containing \fIpat\fR, or you can use \fB+\fR instead of \fB\-\fR to refer to the lines after the one containing \fIpat\fR. If you don't give a line offset, then the editor will affect characters up to the match place, rather than whole lines; thus use ``+0'' to affect @@ -1819,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. +.ne 1i .PP Strings given to searches may actually be regular expressions. If you do not want or need this facility, you should @@ -1836,7 +1842,7 @@ It is also necessary to use a \e before a The following table gives the extended forms when \fBmagic\fR is set. .DS .TS -bl l. +lb l. \(ua at beginning of pattern, matches beginning of line $ at end of pattern, matches end of line \fB\&.\fR matches any character @@ -1856,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. +.sp .5 .DS .TS lb l. @@ -1873,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 +.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 |