vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit a3972cb0783b261f1e314829aa2e7f730adc2d5c
parent bc044c0533ecd0220970bd10d3c4f547c5789c5b
Author: Evan Gates <evan.gates@gmail.com>
Date:   Wed, 22 Sep 2021 11:02:45 -0700

man: explicitly document default mark usage

Marks use 'am and 'aM to mirror register usage for yank/put and allow a
default mark when one is not specified.  For anyone coming from vim and
used to ma and 'a usage, using a default mark when none is specified is
a foreign concept.  This leads to e.g. ''m and ''| when m and | would do.

Explain in the man page that the default mark is used when none is
specified for mark and selection set operations.

[0]: e7e9ff1 (vis: cleanup marks implementation)

Diffstat:
Mman/vis.1 | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/man/vis.1 b/man/vis.1 @@ -137,6 +137,11 @@ sets the mark while .Ic ' Ns Ar a Ns Ic M restores it. +Use of +.Ic m +or +.Ic M +without specifying a mark uses the default mark. .Pp Available marks are: .Bl -tag -width indent @@ -1158,6 +1163,13 @@ align all selections by inserting spaces Selections can be manipulated using set operations. The first operand is the currently active selections while the second can be specified as a mark. +For example, +.Ic ' Ns Ar a Ns Ic \&| +produces the union of the mark +.Ar a +and the current selection. +Use of set operations without specifying a mark use the default mark as +the first operand. .Pp .Bl -tag -width XXXXXXXXXX -compact .It Ic \&|