Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When using the arrow keys in Vim on Linux, they act the same way as h and l , stopping when the end of a line is reached. GVim on Windows doesn't do this, instead allowing the arrow keys continue past the end (or beginning) of a line and on to the next line.

Is there any way to change the arrow key behaviour and cause them to stop at the end of a line like the character navigation keys?

NOTE: I am not looking for a way to get to the beginning or end of a line, I realize that 0 and $ do this.

share|improve this question
up vote 1 down vote accepted

add this to your .vimrc file:

set whichwrap=b,s,h,l,<,>,~,[,]

to enable moving the cursor to the next line.

And to disable (I think):

set whichwrap=
share|improve this answer
Thanks, worked like a charm. Just a note for other people new to Windows GVim, the file is _vimrc for windows systems. – viking Jun 30 '11 at 16:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.