In vim, how do I make the left and right arrow keys change line?

After some further Googling, I found the answer is to use the whichwrap option.

  • Vim Faq
  • Vim documentation on whichwrap option

I added the following line to my .vimrc:

set whichwrap+=<,>,[,]

The < and > options turn on the desired setting for normal mode and [ and ] turn on the desired setting for insert mode.


Add this to your .vimrc:

set whichwrap+=<,>,h,l,[,]