The operators c
, d
, and y
expect a motion, like w
, e
, etc. The second character in the following pairs is not a motion so it is a NOP and nothing is overridden if we use them in mappings.
cd cm co cp cq cr cs cu cx cy cz
dc dm dq dr ds du dx dy dz
yc yd ym yo yp yq yr ys yu yx yz
v
is not an operator but it has similar semantics. There are fewer available pairs, though, because it is possible to use an operator right after v
.
vm vo vq vv vz
Vi didn't have anything assigned to g
so Vim kind of treated the namespace as a dumpster for new two-characters commands. Here are the pairs that are left:
gb gc gl gs gy
z
was free, too, and it got the same treatment, with an even worse outcome:
zq
[WIP]
ZA ZB ZC ZD ZE ZF ZG ZH ZI ZJ ZK ZL ZM ZN ZO ZP ZR ZS ZT ZU ZV ZW ZX ZY
[WIP]
What about
cs
andds
?Popular plugins which use some of them:
gc
ys
,cs
and,ds
cr
cx
gl
Formerly
co
(see commit tpope/vim-unimpaired@3a77590)The article Follow My Leader by Drew Neil about custom vim mappings points this out as well. See also his slides https://speakerdeck.com/nelstrom/follow-my-leader (slide 9 and 10) from a talk he gave about this. The video of the talk on vimeo is unfortunately no longer available.