In vim, how do I make the left and right arrow keys change line?
-------------------------------------------------------------------------------
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
-------------------------------------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping
--
Chapters
00:00 Question
00:42 Accepted answer (Score 43)
01:16 Answer 2 (Score 14)
01:29 Answer 3 (Score 0)
01:43 Answer 4 (Score 0)
01:59 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
Become or hire the top 3% of the developers on Toptal https://topt.al/25cXVn
-------------------------------------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Ominous Technology Looping
--
Chapters
00:00 Question
00:42 Accepted answer (Score 43)
01:16 Answer 2 (Score 14)
01:29 Answer 3 (Score 0)
01:43 Answer 4 (Score 0)
01:59 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.