Trouble With changing default evil keybindings [FOR AVY in particular]

What happened?

I tried to rebind evil-avy-goto-char-timer to “s” in normal mode. I can add unused keybinding (like leader g w) to perform that action using

(map! :leader
      "g w" #'avy-goto-char-timer)

But I Can’t define the same using evil bindings as follows

(after! evil-mode (unbind-key "s")
(evil-define-key 'normal 'global (kbd "s") 'evil-avy-goto-char-timer)

This did not bind s to perform evil-avy-char-timer in normal mode (I tried this without unbind-key too) I can still use map! to set the “s” key for avy-… but that only works in insert mode and I can no longer type the letter s.

I am new to emacs, So do tell If I have missed any info/detail in my question and I’ll add that. Any help is much appreciated.

Explain what went wrong

I couldn’t rebind keys Nothing happens when I use evil-define-keys to bind ‘s’ key to perform -evil-avy-goto-char-timer map! works but is not the behaivour that I want (explained above)

What did you expect to happen?

keybindings defined would work. {{{Explain what should have happened.}}}

Steps to reproduce

  1. …Add keybindings to config.el
  2. …reload doom

System information


Loading data dump...
1 Like