8

I would like to map j k motions in evil to be gj and gk respectively. This is a common remapping people usually do in vim. How can I do that in Emacs. I guess I just need to find how these Evil functions that correspond to gj and gk motions are named.

Gordon Gustafson
  • 40,133
  • 25
  • 115
  • 157
egdmitry
  • 2,071
  • 15
  • 18
  • 2
    For any given key binding you can do `C-h k` followed by the binding to find out the name of the command it is bound to. – itsjeyd May 10 '14 at 10:14

1 Answers1

14

The functions you're looking for are evil-next-visual-line and evil-previous-visual-line. You can bind them with:

(define-key evil-normal-state-map (kbd "j") 'evil-next-visual-line)
(define-key evil-normal-state-map (kbd "k") 'evil-previous-visual-line)
tungd
  • 14,467
  • 5
  • 41
  • 45