binding to "cp" without breaking "c"

Stefan Monnier monnier at
Fri Jun 13 21:54:20 CEST 2014

> and another "cp" in the same keymap: a keymap is a lookup-table and "c"
> can either be mapped to a command or to another keymap, not both). What
> Evil does is to manually wait for further keys before the body of
> `evil-change` is executed. This happens in the `interactive` form of

I'm very much not familiar with Evil, so this may be completely
inapplicable, but an option might be to do the following:
- don't bind `c' to `evil-change'.
- instead, add various `c <foo>' bindings, to `evil-change' and change
  it so it uses last-command-event or this-single-command-keys to know
  which binding triggered it (instead of using something like
  `read-event' to wait for the next event).

-- Stefan

More information about the implementations-list mailing list