Vim: move around quickly inside of long line

后端 未结 8 659
轻奢々
轻奢々 2020-12-22 18:50

I have word-wrap enabled and tend to have quite long lines. But moving around inside a line that\'s actually 4 lines high with \"w\" is cumbersome. I keep using / to jump to

8条回答
  •  萌比男神i
    2020-12-22 19:27

    I think you can benefit from gk and gj instead of just k and j.

    Also look at 'virtualedit' for some options that allow you to cursor through 'void' areas without flicking the cursor to the next best physical character.

    You might want to (temporarily)

    nnoremap  k gk
    nnoremap  j gj
    

    Leave out the part to apply this globally.

提交回复
热议问题