Jason McIntyre writes:
> On Fri, Feb 02, 2018 at 08:17:11PM -0700, Anthony J. Bentley wrote:
> > trondd writes:
> > > The manpage for vi(1) has a small error for the :Visual/:visual command. 
>  The
> > > 'V' can be capital or lowercase, followed by an 'i' and optionally 'sual'
> . Bu
> > > t
> > > the manpage shows the command as [Vi]i[sual] instead of [Vv]i[sual].
> > 
> > This reveals a problem with the manpage. Everywhere else [] refers to
> > optional parts of a command, but in the EX COMMANDS section, [] does
> > double duty both to mark multiple valid characters as in glob(7) and to
> > signify optional parts of the command.
> > 
> > Even in EX COMMANDS [] means "optional" only except for a few commands:
> > [Ee][dit], [Ee]x, [Ff]g, [Nn][ext], [Pp]rev[ious], [Tt]a[g], and now
> > [Vv]i[sual].
> > 
> > For readability I think these should be separate lines. Doubly so
> > because the capitalized commands actually behave differently as
> > explained in the reference documentation, and NOT explained in the
> > manpage...
> > 
> > This does leave open the question of how the usage strings in ex_cmd.c
> > should change, and whether the code there should be rearchitected so
> > that, e.g., "edit" and "Edit" can have different usage strings.
> > 
> > -- 
> > Anthony J. Bentley
> > 
>
> morning.
>
> can you explain how uppercase and lowercase variants differ? it could be
> that the simplest fix is not to list the uppercase variant (e.g. Visual)
> and just explain in a separate paragraph those few commands that have
> the variant.
>
> but that depends on what the difference is.

For each of them the capitalized variant opens the result in a new
screen instead of the current screen. (Fg foregrounds to a new screen
instead of swapping with the current screen, Tag opens the tag in a
new screen, etc.) Thus the capitalized variants are only available in
vi, not ex.

Of these, "visual" is different from the others in that in ex mode and
vi mode they are actually separate commands. Hence the current
documentation:

     [line] vi[sual] [type] [count] [flags]
             ex mode only.  Enter vi.

     [Vv]i[sual][!] [+cmd] [file]
             vi mode only.  Edit a new file.

Reply via email to