Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move to next line by pressing l at the end of line in VIM?

Tags:

vim

macvim

Suppose my cursor is at the end of a line.

1  this is first line⚿
2  next line here

I know that I can move to the next line by hitting j but that's too much work if my finger is already on top of l. So what remapping do I need to do in order to emulate the modern behaviour of going to the beginning of the next line by pressing the right arrow or l at the end of a line? Similarly, how do I get to the end of the previous line by pressing h at the beginning of the current line?

like image 992
Nanashi No Gombe Avatar asked Oct 19 '25 04:10

Nanashi No Gombe


1 Answers

Use the whichwrap option:

:set whichwrap=lh
like image 57
William Pursell Avatar answered Oct 22 '25 05:10

William Pursell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!