In Evil
, The default binding of ESC
in insert mode is (evil-normal-state nil)
.
I want to rebind ESC in insert mode like this:
(define-key evil-insert-state-map (kbd "ESC")
(lambda () (interactive) (message "hello")))
However, when I try to do this I get unexpected behavior. First, the binding does not change. And for a reason I don't understand it also breaks M-x
in insert mode.
Why does this happen?