Moving default bindings
Development reference · View source
keys.rebind maps a default key sequence (left) to a new one (right).
keys:
leader: Ctrl-x
window: Ctrl-a
rebind:
Space g: Leader G # the whole Git menu moves
Space g l: Leader G q # ...but Git log goes here instead
Ctrl-w x: Window e
Space e: Space
",": F12
Writing the two sides:
| Side | What it accepts |
|---|---|
| Left | A default spelling only: a binding, alias, or prefix Runyte ships. Write Space and Ctrl-w, never Leader or Window. |
| Right | Any key sequence. Leader and Window mean the configured prefixes; literal Space and Ctrl-w mean those physical keys. |
How rules combine:
- All rules apply at once. File order does not matter.
- The longest matching left side wins. Above,
Space g dbecomesCtrl-x G d, whileSpace g lbecomesCtrl-x G q. - A narrower rule may deliberately move a key out of the namespace a broader rule chose.
What rebind cannot do (use keys.bind instead):
- remove a binding,
- bind a command that has no default key,
- move most direct single-key editing bindings.