On Sun, Jun 13, 2021 at 6:25 AM Bram Moolenaar <
Br...@moolenaar.net> wrote:
>
>
> Yegappan wrote:
>
> > A count can be specified before or after the first letter of the
> > yy, dd, cc, >>, << and !! commands. This is not mentioned in
> > the Vim help. There are a couple of discussions regarding this:
> >
> >
https://vi.stackexchange.com/questions/31428/removing-multiple-lines-d3d-vs-3dd
> >
https://vi.stackexchange.com/questions/2543/how-can-i-map-dcountd
> >
> > The opengroup Vi specification indirectly mentions this:
> >
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_02
> >
> > It would be good to mention this in the Vim help.
>
> We can add something below ":help operator". It already mentions that a
> count on the operator and a count on the motion is multiplied. How
> about this:
>
> *motion-count-multiplied*
> If the motion includes a count and the operator also had a count before it,
> the two counts are multiplied. For example: "2d3w" deletes six words.
> *operator-doubled*
> When doubling the operator it operates on a line. When using a count, before
> or after the first character, that many lines are operated upon. Thus `3dd`
> deletes three lines. A count before and after the first character is
> multiplied, thus `2y3y` yanks six lines.
>