Vim logo vim online Vim Book Ad

 Tip #308: Move through wrapped lines.

 tip karma   Rating 47/23, Viewed by 829 

created:   August 12, 2002 1:34      complexity:   intermediate
author:   Little Dragon      as of Vim:   5.7

If you don't like the fact that when you press Up and Down on a wrapped line, you get to the next phisical line instead of the next line on the screen, you can do something like this:

imap <silent> <Down> <C-o>gj
imap <silent> <Up> <C-o>gk

nmap <silent> <Down> gj
nmap <silent> <Up> gk

 rate this tip  Life Changing Helpful Unfulfilling 

<<annoying "Hit any key to close this window..." | close vim you left open remotely >>

Additional Notes

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo