Hi Jason,

Jason McIntyre wrote on Sat, Feb 03, 2018 at 05:41:01PM +0000:

> personally i still think it would be simpler to only list these commands
> once, but note which subset can take a capital letter (and what that
> means).

I seems you are right, amybe i should believe you the first time
you say something.  See below for an updated patch.

> can of worms, there's still stuff like :exusage

I think that can remain as it is.  It isn't very precise anyway,
with very short half-line descriptions only and not saying how
the ex commands can be abbreviated.  So at least the usage of []
isn't inconsistent in there.

In principle, :exusage ought to be deleted.  It's not the job of a
program to contain documentation.  Documentation belongs in the
manual page, and there it is indeed.  But that's a different matter.

> and the USD docs to update. so a man page fix will not suffice.

I wouldn't bother.  They are not installed, and the base system
doesn't even provide tools to process them.  If we ever decide
to do anything with them, they will require a full check of accuracy
anyway.

Yours,
  Ingo


Index: vi.1
===================================================================
RCS file: /cvs/src/usr.bin/vi/docs/USD.doc/vi.man/vi.1,v
retrieving revision 1.74
diff -u -p -r1.74 vi.1
--- vi.1        22 Aug 2017 20:27:18 -0000      1.74
+++ vi.1        3 Feb 2018 19:04:16 -0000
@@ -1794,18 +1794,11 @@ Delete the lines from the file.
 Display buffers, screens or tags.
 .Pp
 .It Xo
-.Op Cm Ee Ns
-.Op Cm dit Ns
+.Cm e Ns Op Cm dit Ns | Ns Cm x Ns
 .Op Cm !\&
 .Op Ar +cmd
 .Op Ar file
 .Xc
-.It Xo
-.Op Cm Ee Ns
-.Cm x Ns Op Cm !\&
-.Op Ar +cmd
-.Op Ar file
-.Xc
 Edit a different file.
 .Pp
 .It Xo
@@ -1822,14 +1815,10 @@ command.
 .Xc
 Display and optionally change the file name.
 .Pp
-.It Xo
-.Op Cm Ff Ns
-.Cm g
-.Op Ar name
-.Xc
+.It Cm fg Op Ar name
 .Nm vi
-mode only.
-Foreground the specified screen.
+only.
+Background the current screen and foreground the specified screen instead.
 .Pp
 .It Xo
 .Op Ar range
@@ -1880,9 +1869,9 @@ Display the lines unambiguously.
 .Cm map Ns Op Cm !\&
 .Op Ar lhs rhs
 .Xc
-Define or display maps (for
 .Nm vi
-only).
+only.
+Define or display maps.
 .Pp
 .It Xo
 .Op Ar line
@@ -1912,8 +1901,7 @@ Write the abbreviations, editor options 
 .Ar file .
 .Pp
 .It Xo
-.Op Cm Nn Ns
-.Op Cm ext Ns
+.Cm n Ns Op Cm ext Ns
 .Op Cm !\&
 .Op Ar file ...
 .Xc
@@ -1933,11 +1921,7 @@ Save the file in a form that can later b
 .Fl r
 option.
 .Pp
-.It Xo
-.Op Cm \&Pp Ns
-.Cm rev Ns Op Cm ious Ns
-.Op Cm !\&
-.Xc
+.It Cm prev Ns Oo Cm ious Oc Ns Op Cm !\&
 Edit the previous file from the argument list.
 .Pp
 .It Xo
@@ -1959,7 +1943,7 @@ Append buffer contents to the current li
 .Cm q Ns Op Cm uit Ns
 .Op Cm !\&
 .Xc
-End the editing session.
+End editing the file and close the current screen.
 .Pp
 .It Xo
 .Op Ar line
@@ -1980,10 +1964,10 @@ if it was previously saved.
 .It Xo
 .Cm res Ns Op Cm ize
 .Op Cm + Ns | Ns Cm - Ns
-.Ar size
+.Ar lines
 .Xc
 .Nm vi
-mode only.
+only.
 Grow or shrink the current screen.
 .Pp
 .It Xo
@@ -2132,8 +2116,7 @@ character is usually
 .Aq control-Z .
 .Pp
 .It Xo
-.Op Cm Tt Ns
-.Cm a Ns Op Cm g Ns
+.Cm ta Ns Op Cm g Ns
 .Op Cm !\&
 .Ar tagstring
 .Xc
@@ -2195,19 +2178,18 @@ editor.
 .Op Ar flags
 .Xc
 .Nm ex
-mode only.
+only.
 Enter
 .Nm vi .
 .Pp
 .It Xo
-.Op Cm Vi Ns
-.Cm i Ns Op Cm sual Ns
+.Cm vi Ns Op Cm sual Ns
 .Op Cm !\&
 .Op Ar +cmd
 .Op Ar file
 .Xc
 .Nm vi
-mode only.
+only.
 Edit a new file.
 .Pp
 .It Xo
@@ -2231,19 +2213,23 @@ command.
 .Op Cm !\&
 .Op Ar file
 .Xc
+Write the file.
+.Pp
 .It Xo
 .Op Ar range
 .Cm wn Ns Op Cm !\&
 .Op >>
 .Op Ar file
 .Xc
+Write the file and edit the next file from the argument list.
+.Pp
 .It Xo
 .Op Ar range
 .Cm wq Ns Op Cm !\&
 .Op >>
 .Op Ar file
 .Xc
-Write the file.
+Write the file and close the current screen.
 .Pp
 .It Xo
 .Op Ar range
@@ -2251,8 +2237,7 @@ Write the file.
 .Op Cm !\&
 .Op Ar file
 .Xc
-Exit the editor,
-writing the file if it has been modified.
+Write the file if it has been modified and close the current screen.
 .Pp
 .It Xo
 .Op Ar range
@@ -2271,6 +2256,21 @@ Copy the specified lines to a buffer.
 .Xc
 Adjust the window.
 .El
+.Pp
+For
+.Cm e ,
+.Cm fg ,
+.Cm n ,
+.Cm prev ,
+.Cm ta ,
+and
+.Cm vi ,
+if the first letter of the command is capitalized, the current screen is
+split and the new file is displayed in addition to the current screen.
+This feature is only available in
+.Nm vi ,
+not in
+.Nm ex .
 .Sh SET OPTIONS
 There are a large number of options that may be set
 .Pq or unset

Reply via email to