Re: cursor movement over wrapped lines
- Tom Seddon wrote:
> Hi,I use 'wrap' too, but my vimrc includes the following for the exact
> When vim is set to wrap lines, moving the cursor up or down (i.e., with
> j/k or up/down arrow keys) moves it to the next line in the document.
> This can be inefficient if the window is narrow and/or the lines long.
> Is there some way to make the cursor move in terms of lines on screen
> rather than lines in the document? (This is how Visual Studio .NET
> behaves, for example.)
> I've found nothing obvious in the documentation, nor in the mailing list
> archives. Can this be done?
reason you're mentioning here:
" mappings and abbreviations
" use keypad Up and Down to move by screen lines
" jk still move by file lines
map <Up> gk
imap <Up> <C-O>gk
map <Down> gj
imap <Down> <C-O>gj
I copy-pasted the above from my vimrc so you can copy-paste it into
yours via the clipboard if you like them.