Slightly more useful evil bindings for j and k
Switch branches/tags
Nothing to show
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Oct 26, 2018
LICENSE Initial commit Oct 26, 2018 Further clarification in readme Nov 11, 2018
evil-better-visual-line.el Name change Oct 26, 2018

Evil Better Visual Line

Back in my vim days, I much preferred to default to moving on visual lines as opposed to source lines, perhaps best expressed with the following lines from my .vimrc:

nnoremap j gj
nnoremap k gk
vnoremap j gj
vnoremap k gk

However, this rebinding is somewhat annoying in visual line and visual block mode, as moving on visual lines is almost never the intent in those modes. This package provides two commands, evil-better-visual-line-next-line and evil-better-visual-line-previous-line, which act like gj and gk unless in either of those modes (or states in evil terminology), in which case they act like j and k. evil-better-visual-line-on is also provided as a convenient way of binding these two commands to j and k.



Install from MELPA directly with M-x package-install evil-better-visual-line. See the melpa repository for details about how to set up MELPA if you have not already done so.


I would recommend jwiegley’s excellent use-package to install if you can:

(use-package evil-better-visual-line
  :ensure t


I have a layer in my .spacemacs.d set up to load this package and call evil-better-visual-line-on, which you can add to your own private layer directory if you would like to use this package with spacemacs.


Download with:

git clone

Make sure that the resulting folder is in your load path. Example in .emacs.d/init.el for .emacs.d/evil-better-visual-line:

(add-to-list 'load-path (expand-file-name "/evil-better-visual-mave"))

Random folder on your system:

(add-to-list 'load-path "/path/to/evil-better-visual-mave")

And then turn it on:

(require 'evil-better-visual-line)