The Computer Oracle

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

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: Music Box Puzzles

--

Chapters
00:00 In Vim, How Do I Make The Left And Right Arrow Keys Change Line?
00:32 Accepted Answer Score 43
01:04 Answer 2 Score 14
01:17 Answer 3 Score 0
01:33 Answer 4 Score 0
01:45 Thank you

--

Full question
https://superuser.com/questions/35389/in...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#vim

#avk47



ACCEPTED ANSWER

Score 43


After some further Googling, I found the answer is to use the 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.




ANSWER 2

Score 14


Add this to your .vimrc:

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



ANSWER 3

Score 0


This is default behavior - you can always use Home and End to jump to the start and finish of a line however.




ANSWER 4

Score 0


You can work around this by using w and b which will wrap across lines.