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.

-- 
Hacker: Someone skilled in computer programming (good guy).
Cracker: A hacker that uses his skills to crack software (bad guy).

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202106131325.15DDPUS0594162%40masaka.moolenaar.net.

Raspunde prin e-mail lui