I changed the i key binding in evil-normal-state-map
to go up and k to go down (these are just two examples). But evil-operator-state-map
and evil-visual-state-map
do not change accordingly, but keep the old key bindings (i.e. hijk
). Even making new keymap and assign key bindings, it still uses the old one.
1 Answer
These maps inherit from motion state: if keys are not bound in the other states, they will take their bindings from above. So:
(define-key evil-motion-state-map "i" #'evil-previous-line)
(define-key evil-motion-state-map "k" #'evil-next-line)
Now, provided that the other maps do not already have bindings for i
and k
, they will use the ones you defined in evil-motion-state-map
.