summaryrefslogtreecommitdiff
path: root/usr.bin/vi
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2004-01-15 11:11:13 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2004-01-15 11:11:13 +0000
commit1e71de721ae7c0d1dcb4b6c9860a99be2c9f9fd7 (patch)
tree629f12f38ec4d81603e58b6fc05fa22287bc3fde /usr.bin/vi
parent39478f79073f77fb4e937a8dfdef4b72ef67e281 (diff)
update vi.ref to reflect reality;
help and ok millert@
Diffstat (limited to 'usr.bin/vi')
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff148
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff30
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/spell.ok2
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/vi.cmd.roff22
-rw-r--r--usr.bin/vi/docs/USD.doc/vi.ref/vi.ref85
5 files changed, 148 insertions, 139 deletions
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff b/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
index fc5e02baefc..6d8c4da703a 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/ex.cmd.roff
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ex.cmd.roff,v 1.5 2001/01/29 01:58:35 niklas Exp $
+.\" $OpenBSD: ex.cmd.roff,v 1.6 2004/01/15 11:11:12 jmc Exp $
.\"
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
@@ -105,17 +105,19 @@ subsequent lines are affected by the command, e.g. the command
prints out lines 3, 4, 5 and 6.
.pp
When only a line or range is specified, with no command, the implied
-command is either a
-.CO list ,
-.CO number
-or
-.CO print
-command.
-The command used is the most recent of the three commands to have been
-used (including any use as a flag).
-If none of these commands have been used before, the
-.CO print
-command is the implied command.
+command is
+.CO print .
+.\" either a
+.\" .CO list ,
+.\" .CO number
+.\" or
+.\" .CO print
+.\" command.
+.\" The command used is the most recent of the three commands to have been
+.\" used (including any use as a flag).
+.\" If none of these commands have been used before, the
+.\" .CO print
+.\" command is the implied command.
When no range or count is specified and the command line is a blank line,
the current line is incremented by 1 and then the current line is displayed.
.pp
@@ -389,8 +391,8 @@ Affected by the
.OP shiftwidth
option.
.SE
-.KY abbrev
-.IP "ab[brev] lhs rhs"
+.KY abbreviate
+.IP "ab[breviate] lhs rhs"
Add an abbreviation to the current abbreviation list.
When inserting text in
.CO vi ,
@@ -400,26 +402,28 @@ a match with
.LI lhs .
If a match is found, they are replaced with
.LI rhs .
-The set of characters that are checked for a match are defined as follows,
-for inexplicable historical reasons.
-If only one or two characters were entered before the non-word character
-that triggered the check,
-and after the beginning of the insertion,
-or the beginning of the line or the file,
-or the last
-.LI <blank>
-character that was entered,
-then the one or the both characters are checked for a match.
-Otherwise, the set includes both characters,
-as well as the characters that precede them that are the same word
-class (i.e. word or non-word) as the
-.b second
-to last character entered before the non-word character that triggered
-the check,
-back to the first
-.LI <blank> character,
-the beginning of the insertion,
-or the beginning of the line or the file.
+.\" The set of characters that are checked for a match are defined as follows,
+.\" for inexplicable historical reasons.
+.\" If only one or two characters were entered before the non-word character
+.\" that triggered the check,
+.\" and after the beginning of the insertion,
+.\" or the beginning of the line or the file,
+.\" or the last
+.\" .LI <blank>
+.\" character that was entered,
+.\" then the one or the both characters are checked for a match.
+.\" Otherwise, the set includes both characters,
+.\" as well as the characters that precede them that are the same word
+.\" class (i.e. word or non-word) as the
+.\" .b second
+.\" to last character entered before the non-word character that triggered
+.\" the check,
+.\" back to the first
+.\" .LI <blank> character,
+.\" the beginning of the insertion,
+.\" or the beginning of the line or the file.
+Abbreviations must end with a word character,
+and may not mix word/non-word characters (except at the end).
.sp
For example, the abbreviations:
.sp
@@ -888,7 +892,7 @@ Otherwise, insert a single space.
Appending a
.QT !
character to the command name causes a simpler join with no
-white-space processing.
+whitespace processing.
.SS
.SP Line:
Unchanged.
@@ -1062,28 +1066,28 @@ Affected by the options
and
.OP writeany .
.SE
-.KY open
-.IP "[line] o[pen] /pattern/ [flags]"
-Enter open mode.
-Open mode is the same as being in
-.CO vi ,
-but with a one-line window.
-All the standard
-.CO vi
-commands are available.
-If a match is found for the optional RE argument,
-the cursor is set to the start of the matching pattern.
-.sp
-.i "This command is not yet implemented."
-.SS
-.SP Line:
-Unchanged, unless the optional RE is specified, in which case it is
-set to the line where the matching pattern is found.
-.SP Options:
-Affected by the
-.OP open
-option.
-.SE
+.\" .KY open
+.\" .IP "[line] o[pen] /pattern/ [flags]"
+.\" Enter open mode.
+.\" Open mode is the same as being in
+.\" .CO vi ,
+.\" but with a one-line window.
+.\" All the standard
+.\" .CO vi
+.\" commands are available.
+.\" If a match is found for the optional RE argument,
+.\" the cursor is set to the start of the matching pattern.
+.\" .sp
+.\" .i "This command is not yet implemented."
+.\" .SS
+.\" .SP Line:
+.\" Unchanged, unless the optional RE is specified, in which case it is
+.\" set to the line where the matching pattern is found.
+.\" .SP Options:
+.\" Affected by the
+.\" .OP open
+.\" option.
+.\" .SE
.KY preserve
.IP "pre[serve]"
Save the file in a form that can later be recovered using the
@@ -1173,7 +1177,7 @@ commands (i.e.
.CO xit
or
.CO ZZ )
-in a row) will override this check and the editor will exit.
+in a row will override this check and the editor will exit.
.SS
.SP Line:
Unchanged.
@@ -1371,9 +1375,9 @@ with the string
.LI replace
on the specified line(s).
If the
-.QT /pattern/repl/
+.QT /pattern/replace/
argument is not specified, the
-.QT /pattern/repl/
+.QT /pattern/replace/
from the previous
.CO substitute
command is used.
@@ -1531,15 +1535,15 @@ character to the command name.
.sp
Capitalizing the first letter of the command, i.e.
.CO Tagnext ,
-while in
-.CO vi
+while in
+.CO vi
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
-.SS
+.SS
.SP Line:
Set to the line indicated by the tag.
.SP Options:
-Affected by the
+Affected by the
.OP autowrite
and
.OP writeany
@@ -1597,15 +1601,15 @@ character to the command name.
.sp
Capitalizing the first letter of the command, i.e.
.CO Tagprev ,
-while in
-.CO vi
+while in
+.CO vi
mode, will edit the file in a new screen.
In this case, any modifications to the current file are ignored.
-.SS
+.SS
.SP Line:
Set to the line indicated by the tag.
.SP Options:
-Affected by the
+Affected by the
.OP autowrite
and
.OP writeany
@@ -1631,8 +1635,8 @@ and
.OP writeany
options.
.SE
-.KY unabbrev
-.IP "una[bbrev] lhs"
+.KY unabbreviate
+.IP "una[bbreviate] lhs"
Delete an abbreviation.
Delete
.LI lhs
@@ -1801,7 +1805,7 @@ commands (i.e.
.CO xit
or
.CO ZZ )
-in a row) will override this check and the editor will exit,
+in a row will override this check and the editor will exit,
ignoring any files that have not yet been edited.
.sp
The
@@ -1843,7 +1847,7 @@ commands (i.e.
.CO xit
or
.CO ZZ )
-in a row) will override this check and the editor will exit,
+in a row will override this check and the editor will exit,
ignoring any files that have not yet been edited.
.SS
.SP Line:
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff b/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
index 6f873bb115b..f672d9d49af 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/set.opt.roff
@@ -1,4 +1,4 @@
-.\" $OpenBSD: set.opt.roff,v 1.6 2001/01/29 01:58:35 niklas Exp $
+.\" $OpenBSD: set.opt.roff,v 1.7 2004/01/15 11:11:12 jmc Exp $
.\"
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
@@ -25,7 +25,7 @@ from all other commands for it to be accepted, in
Historically, only the full name and the official abbreviations
were accepted by
.EV ex vi .
-Using full names in your startup files and environmental variables will
+Using full names in your startup files and environment variables will
probably make them more portable.)
The part in square brackets is the default value of the option.
Most of the options are boolean, i.e. they are either on or off,
@@ -147,7 +147,7 @@ and
commands change from the first nonblank of the line to the end of the
line, instead of from the beginning of the line to the end of the line.
.KY autoprint
-.IP "autoprint, ap [off]"
+.IP "autoprint, ap [on]"
.CO Ex
only.
Cause the current line to be automatically displayed after the
@@ -286,7 +286,7 @@ which are used as path prefixes for any relative path names used as
arguments for the
.CO cd
command.
-The value of this option defaults to the value of the environmental
+The value of this option defaults to the value of the environment
variable
.LI CDPATH
if it is set, otherwise to the current directory.
@@ -350,7 +350,7 @@ will perform file name expansion.
The number of columns in the screen.
Setting this option causes
.EV ex vi
-to set (or reset) the environmental variable
+to set (or reset) the environment variable
.LI COLUMNS .
See the section entitled
.QB "Sizing the Screen"
@@ -371,7 +371,7 @@ terribly boring legal notice) before displaying the file.
.KY directory
.IP "directory, dir [environment variable TMPDIR, or /tmp]"
The directory where temporary files are created.
-The environmental variable
+The environment variable
.LI TMPDIR
is used as the default value if it exists, otherwise
.LI /tmp
@@ -479,7 +479,7 @@ will perform file name expansion.
This option causes the screen to flash instead of beeping the keyboard,
on error, if the terminal has the capability.
.KY hardtabs
-.IP "hardtabs, ht [8]"
+.IP "hardtabs, ht [0]"
This option defines the spacing between hardware tab settings, i.e.
the tab expansion done by the operating system and/or the terminal
itself.
@@ -523,7 +523,7 @@ only.
The number of lines in the screen.
Setting this option causes
.EV ex vi
-to set (or reset) the environmental variable
+to set (or reset) the environment variable
.LI LINES .
See the section entitled
.QB "Sizing the Screen"
@@ -608,7 +608,7 @@ See the
.XR mesg 1
utility for more information.
.KY msgcat
-.IP "msgcat [./]"
+.IP "msgcat [/usr/share/vi/catalog/]"
This option selects a message catalog to be used to display error and
informational messages in a specified language.
If the value of this option ends with a '/', it is treated as the name
@@ -618,10 +618,10 @@ where
.QT XXXX
is the value of the
.LI LANG
-environmental variable, if it's set, or the value of the
+environment variable, if it's set, or the value of the
.LI LC_MESSAGES
-environmental variable if it's not.
-If neither of those environmental variables are set,
+environment variable if it's not.
+If neither of those environment variables are set,
or if the option doesn't end in a '/',
the option is treated as the full path name of the message catalog to use.
.sp
@@ -703,7 +703,7 @@ only.
Throughput of text is expedited by setting the terminal not to do automatic
carriage returns when printing more than one (logical) line of output,
greatly speeding output on terminals without addressable cursors when text
-with leading white space is printed.
+with leading whitespace is printed.
.sp
.i "This option is not yet implemented."
.KY paragraphs
@@ -1082,7 +1082,7 @@ significant in a tag name.
Setting the value to 0 makes all of the characters in the tag name
significant.
.KY tags
-.IP "tags, tag [tags /var/db/libc.tags /sys/kern/tags]"
+.IP "tags, tag [tags]"
Sets the list of tags files, in search order,
which are used when the editor searches for a tag.
.KY term
@@ -1090,7 +1090,7 @@ which are used when the editor searches for a tag.
Set the terminal type.
Setting this option causes
.EV ex vi
-to set (or reset) the environmental variable
+to set (or reset) the environment variable
.LI TERM .
.KY terse
.IP "terse [off]"
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok b/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok
index da45f8df092..b99cd106050 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/spell.ok
@@ -113,7 +113,7 @@ brev
bsd
bugs.current
c2w
-carat
+caret
cd
cdpath
cdy
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/vi.cmd.roff b/usr.bin/vi/docs/USD.doc/vi.ref/vi.cmd.roff
index c224cc44eab..8c789290f0b 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/vi.cmd.roff
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/vi.cmd.roff
@@ -1,4 +1,4 @@
-.\" $OpenBSD: vi.cmd.roff,v 1.3 2001/01/29 01:58:35 niklas Exp $
+.\" $OpenBSD: vi.cmd.roff,v 1.4 2004/01/15 11:11:12 jmc Exp $
.\"
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
@@ -96,7 +96,7 @@ A major difference between the historical
.CO vi
presentation and
.CO nvi
-is in the scrolling and screen oriented position commands,
+is in the scrolling and screen oriented position commands:
.CO <control-B> ,
.CO <control-D> ,
.CO <control-E> ,
@@ -171,7 +171,7 @@ commands.
.IP "previous context"
The position of the cursor before the command which caused the
last absolute movement was executed.
-Each
+Each
.CO vi
command described in the next section that is considered an
absolute movement is so noted.
@@ -1068,7 +1068,7 @@ command was ignored.
Unchanged.
.SP Column:
Unchanged if the cursor was on the last character in the line,
-otherwise, set to the first nonblank character in the line.
+otherwise set to the first nonblank character in the line.
.SP Options:
Affected by the
.OP edcompatible ,
@@ -1372,9 +1372,9 @@ If either the
.CO N
or
.CO n
-commands are used as motion components for the
+commands are used as motion components for the
.CO !
-command, you will not be prompted for the text of the bang command,
+command, you will not be prompted for the text of the bang command;
instead the previous bang command will be executed.
.sp
Missing RE's (e.g.
@@ -1794,7 +1794,7 @@ line oriented.
.SP Line:
Set to
.LI count ,
-if specified, otherwise, the last line.
+if specified, otherwise the last line.
.SP Column:
Set to the first nonblank character in the line.
.SP Options:
@@ -1977,7 +1977,7 @@ Set to the lowest numbered line insert,
if the buffer is line oriented, otherwise unchanged.
.SP Column:
Set to the first nonblank character of the appended text,
-if the buffer is line oriented, otherwise, the last character
+if the buffer is line oriented, otherwise the last character
of the appended text.
.SP Options:
None.
@@ -2508,7 +2508,7 @@ Set to the first line appended, if the buffer is line oriented,
otherwise unchanged.
.SP Column:
Set to the first nonblank character of the appended text if the buffer
-is line oriented, otherwise, the last character of the appended text.
+is line oriented, otherwise the last character of the appended text.
.SP Options:
None.
.SE
@@ -2722,7 +2722,7 @@ at the bottom of the screen.
.SP ^
If
.LI count1
-is specified, place the line that is at the top of the screen
+is specified, place the line that is at the top of the screen
when
.LI count1
is at the bottom of the screen, at the bottom of the screen,
@@ -3043,7 +3043,7 @@ The next character will not be mapped (see the
.CO map
command for more information)
or interpreted specially.
-A carat
+A caret
.PQ ^
character will be displayed immediately as a placeholder,
but will be replaced by the next character.
diff --git a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref b/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
index 864b16de3dc..0c6e54a9cc0 100644
--- a/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
+++ b/usr.bin/vi/docs/USD.doc/vi.ref/vi.ref
@@ -1,4 +1,4 @@
-.\" $OpenBSD: vi.ref,v 1.8 2004/01/12 18:12:30 millert Exp $
+.\" $OpenBSD: vi.ref,v 1.9 2004/01/15 11:11:12 jmc Exp $
.\"
.\" Copyright (c) 1994
.\" The Regents of the University of California. All rights reserved.
@@ -6,7 +6,7 @@
.\" Keith Bostic. All rights reserved.
.\"
.\" This document may not be republished without written permission from
-.\" Keith Bostic.
+.\" Keith Bostic.
.\"
.\" See the LICENSE file for redistribution information.
.\"
@@ -123,11 +123,11 @@ acknowledged.
.bp 4
.SH 1 Description
.pp
+.CO Ex
+is a line-oriented text editor;
.CO Vi
is a screen oriented text editor.
.CO Ex
-is a line-oriented text editor.
-.CO Ex
and
.CO vi
are different interfaces to the same program,
@@ -457,16 +457,16 @@ Edit sessions are backed by files in the directory named by the
option (the directory
.LI /var/tmp/vi.recover
by default), and are named
-.QC vi.XXXXXX ,
+.QC vi.XXXXXXXXXX ,
where
-.QC XXXXXX
+.QC XXXXXXXXXX
is a number related to the process ID.
When a file is first modified,
a second recovery file containing an email message for the user is created,
and is named
-.QC recover.XXXXXX ,
+.QC recover.XXXXXXXXXX ,
where, again,
-.QC XXXXXX
+.QC XXXXXXXXXX
is associated with the process ID.
Both files are removed at the end of a normal edit session,
but will remain if the edit session is abnormally terminated
@@ -511,7 +511,7 @@ In addition, it has all of the necessary email headers for
When the system is rebooted, all of the files in
.LI /var/tmp/vi.recover
named
-.QC recover.XXXXXX
+.QC recover.XXXXXXXXXX
should be sent to their owners, by email, using the
.b \-t
option of
@@ -530,7 +530,7 @@ If your system does not have the
.CO sendmail
utility (or a mailer program which supports its interface)
the source file
-.LI nvi/common/recover.c
+.LI vi/common/recover.c
will have to be modified to use your local mail delivery programs.
Note, if
.EV nex nvi
@@ -548,19 +548,19 @@ that have no associated email recovery file will have this bit set.
not yet have this bit set.
This is due to the method in which the files are created.)
Such files should be deleted when the system reboots.
-.pp
-A simple way to do this cleanup is to run the Bourne shell script
-.CO recover ,
-from your
-.LI /etc/rc.local
-(or other system startup) file.
-The script should work with the historic Bourne shell,
-a POSIX 1003.2 shell or the Korn shell.
-The
-.CO recover
-script is installed as part of the
-.EV nex nvi
-installation process.
+.\" .pp
+.\" A simple way to do this cleanup is to run the Bourne shell script
+.\" .CO recover ,
+.\" from your
+.\" .LI /etc/rc.local
+.\" (or other system startup) file.
+.\" The script should work with the historic Bourne shell,
+.\" a POSIX 1003.2 shell or the Korn shell.
+.\" The
+.\" .CO recover
+.\" script is installed as part of the
+.\" .EV nex nvi
+.\" installation process.
.pp
Consult the manual page for details on recovering preserved or
aborted editing sessions.
@@ -581,11 +581,14 @@ If the environmental variable
exists,
it is used to specify the number of columns in the screen.
.np
-The TIOCGWINSZ
-.XR ioctl 2
+The TIOCGWINSZ ioctl
+see
+.XR tty 4
is attempted on the standard error file descriptor.
.np
-The termcap entry (or terminfo entry on System V machines)
+The
+.XR terminfo 5
+entry
is checked for the
.QQ li
entry (rows) and the
@@ -677,7 +680,7 @@ at which time the changes must be saved or discarded.
The
.CO resize
command permits resizing of individual screens.
-Screens may be grown, shrunk or set to an absolute number of rows.
+Screens may be grown, shrunk, or set to an absolute number of rows.
.pp
The
.CO ^W
@@ -863,7 +866,7 @@ has been written to understand the obvious extension to the historic
tags file format, i.e., more than a single line in the tags file with
the same initial tag name.
If you wish to extend your
-.CO ctags
+.CO ctags
implementation or other tool with which you build tags files,
this extension should be simple and will require no changes to
.CO nvi .
@@ -942,7 +945,7 @@ queries all attached
databases for the pattern.
If the pattern is a double-quote character followed by a valid buffer
name (e.g.,
-.LI """<character>" ),
+.LI """<character>" ),
then the contents of the named buffer are used as the pattern.
Otherwise, the pattern is a Regular Expression.
.sp
@@ -1015,11 +1018,10 @@ Disconnect from all attached
.CO cscope
databases.
.pp
-Cscope is not freely redistributable software,
-but is fairly inexpensive and easily available.
-To purchase a copy of
-.CO cscope ,
-see http://www.att.com/ssg/products/toolchest.html.
+Cscope was originally part of the official AT&T Unix distribution.
+In April 2000 the code for Cscope was open sourced under the BSD license.
+Information on downloading this code, and on Cscope itself,
+can be obtained from http://cscope.sourceforge.net/.
.SH 1 "Regular Expressions and Replacement Strings"
.pp
Regular expressions are used in line addresses,
@@ -1201,7 +1203,9 @@ editor currently supports two scripting languages, Tcl/Tk and Perl.
version 5.002 or later.
See the
.QB "Building Nvi"
-section for more information.
+section for more information.)
+Note that the Tcl/Tk interface is not supported in the current version
+of OpenBSD.
.pp
The scripting language interface is still being worked on,
therefore the following information is probably incomplete,
@@ -1285,7 +1289,7 @@ as a vi message in the screen
.IP "viNewScreen screenId [file]"
Create a new screen.
.IP "viEndScreen screenId"
-Exit the screen
+Exit the screen
.LI screenId .
.IP "viSwitchScreen screenId screenId"
Switch from the screen
@@ -1468,12 +1472,12 @@ character can be escaped by preceding it with a backslash.)
One of a number of named areas for saving copies of text.
Commands that change or delete text can save the changed or deleted
text into a specific buffer, for later use, if the command allows
-it (i.e. the
+it (e.g. the
.CO ex
.CO change
command cannot save the changed text in a named buffer).
Buffers are named with a single character, preceded by a double quote,
-e.g.
+i.e.
.LI """<character>"
in
.CO vi
@@ -1484,7 +1488,7 @@ in
.CO ex .
(The double quote isn't necessary for
.CO ex
-because buffers names are denoted by their position in the command line.)
+because buffer names are denoted by their position in the command line.)
Historic implementations of
.EV ex vi
limited
@@ -1539,6 +1543,7 @@ These commands are:
.ne 3v
.ft C
.TS
+center;
r r r r.
<control-A> % ( )
`<character> / ? N
@@ -1688,7 +1693,7 @@ The address
.QT '<character>
or
.QT `<character>
-refers to the line marked with the name
+refers to the line marked with the named
.LI <character> .
(See the
.CO k