Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As far as I can tell, d2d and 2dd have exactly the same effect.

I'm curious – ignoring any remappings of d and 2, are there any cases in which d2d and 2dd will produce a different result?

share|improve this question
up vote 3 down vote accepted


According to the Vim manual

[count] An optional number that may precede the command to multiply or iterate the command. If no number is given, a count of one is used, unless otherwise noted.

Both commands will always produce the same result. If there is more than one count, then each count will be multiplied together. For example 2d2d is equivalent to 4dd, and 3d3d is equivalent to 9dd.

If you're only interested in just deleting two lines, you can save yourself an extra keystroke by using dj.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .