diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-04-12 20:29:29 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-04-12 20:35:59 +0200 |
| commit | bcc479670b2a317042fbfc6acf99f81f8958745f (patch) | |
| tree | 4a40c8955b39a4179081240d640d5d040c5f5435 /man/vis.1 | |
| parent | 4b4498fe402dde49acda7949e8ceec67023f87f1 (diff) | |
| download | vis-bcc479670b2a317042fbfc6acf99f81f8958745f.tar.gz vis-bcc479670b2a317042fbfc6acf99f81f8958745f.tar.xz | |
man: document new count specifier for `g` and `v` commands
A few examples:
:x g1 selects the first line
:x g-1 selects the last line
:x g-3, selects the last three lines
:x g2,4 selects lines 2, 3 and 4
:x g,5 selects all lines up and including the fifth
:x g6, selects all lines starting from the sixth
:x g%2 selects all even lines
:x v%2 selects all odd lines
Diffstat (limited to 'man/vis.1')
| -rw-r--r-- | man/vis.1 | 40 |
1 files changed, 36 insertions, 4 deletions
@@ -627,10 +627,12 @@ Same as .Ic X , but for files that do not match the regular expression, and the expression is required. -. -.It Ic g/ Ns Ar regexp Ns Ic / Ar command -.It Ic v/ Ns Ar regexp Ns Ic / Ar command -If the range contains +.\" TODO improve markup, use Op macro, make it actually undertandable :/ +.It Ic g Ns [ Ar count ] Ns [ Ar /regexp/ ] Ar command +.It Ic v Ns [ Ar count ] Ns [ Ar /regexp/ ] Ar command +If the +.Ar count +range contains .Po .Ic g .Pc @@ -639,6 +641,36 @@ or does not contain .Ic v .Pc a match for the expression, run command on the range. +.Pp +The +.Ar count +specifier has the following format, where +.Ic n +and +.Ic m +are integers denoting the ranges. +.Bl -tag -width indent +.It Ic n,m +The closed interval from +.Ic n +to +.Ic m . +If +.Ic n +is missing, +.Ic 1 +is substituted. +If +.Ic m +is missing, +.Ic ∞ +is substituted. Negative values are interpreted relative to the last range. +.It Ic %n +Matches every +.Ic n Ns +-th range. +.El +. .El .Pp These may be nested arbitrarily deeply. |
