avy icon indicating copy to clipboard operation
avy copied to clipboard

key binding(s) to change target action?

Open glucas opened this issue 9 years ago • 1 comments

It might be useful to have a key map for additional behavior when an avy command is waiting for input?

For example: Let's say I bind M-m to avy-goto-word-1. I might:

  1. Hit M-m, but at the char prompt decide I want to search the current line only, so I hit M-l to switch to avy-goto-char-in-line.
  2. Hit M-m and at the prompt enter a character to see the matches. But before I choose one, I hit M-l which changes the search scope to the current line and shows me the matches for the char I already entered.

Obviously a prefix key or hydra could be used to bind multiple avy search commands behind some initial key, but it could be useful to be able to change the scope in this way within an "avy session" where the search characters already entered are automatically re-applied to some other avy command.

glucas avatar Sep 14 '16 15:09 glucas

I suppose this is similar to the avy-dispatch-alist support, where a non-matching key can change the resulting avy action. The difference is that the non-matching key would instead start a new avy search, with the same input (if any).

glucas avatar Sep 14 '16 15:09 glucas