I'm trying to transfer over from vim to Emacs. I'm using evil
to emulate vim modal editing. In vim, I've remapped jk
to get me out of insert mode and back into normal mode using inoremap jk <esc>
. At the moment, I'm using
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
(key-chord-define evil-replace-state-map "jk" 'evil-normal-state)
to do this in Emacs.
However, when I'm in insert mode and want to type, say, jump
, I end up with just mp
, and j u is undefined
appears under the mode bar.
Is there any way to fix this behaviour? Preferably, the solution would even allow me to type jk
by typing j
, waiting, and then typing k
(like in vim).
UPDATE
To clarify, I was only using key-chord
as a temporary solution to get me into normal mode; I am very willing to accept any solution that fixes the problem, regardless of whether it involves key-chord
.
(key-chord-define evil-insert-state-map "jk" 'evil-normal-state)
let's you escape from insert mode.