Question

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.

Was it helpful?

Solution

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)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top