Skip to content

Instantly share code, notes, and snippets.

@romainl
Last active March 13, 2024 23:15
Show Gist options
  • Star 25 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save romainl/1f93db9dc976ba851bbb to your computer and use it in GitHub Desktop.
Save romainl/1f93db9dc976ba851bbb to your computer and use it in GitHub Desktop.
Vim: available key pairs in normal mode…

Vim: available key pairs in normal mode

All lowercase

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

All UPPERCASE

[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

Mixed case

[WIP]

@romainl
Copy link
Author

romainl commented Dec 3, 2022

@jchros all good points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment