As far as built-in operators and motions go, they are completely identical. There is some semantic value; "delete to 2 ends of words" vs "twice, delete to end of word," but from vim's perspective there is only a single count for the operator+motion. You can provide both if you wish:
2d2e means delete 4 to end. The rule is that vim multiplies each given number to produce the count (which is 4).
In fact, you can use even more with registers:
2de, but place in register
"a2de identical to above
"ad2e identical to above
2"a2d2e, delete to 8 ends of words, placing in register
Similarly, with puts from a register, you can specify multiple counts:
2"a2p paste four times from reigster
2"a2"a2"a2"ap paste 16 times from register
Some commands, despite not being operators or motions do support "middle" count. The primary example is the
<c-w> family of window commands.
2<c-w>2w means go to window 4.
There are some caveats though:
- some operators are multiple characters, like
gu. You can write
gu2e, but not
g2ue, since the operator is
gu as a unit.
- some motions and text objects are multiple characters.
d2iw is fine, but
di2w is meaningless.
d2gj is good, but
dg2j is not.
custom maps can break. Let's say you make the map
onoremap <space> 2w
2d<space> works exactly as you expect: it deletes four words. However,