how can i intuitively move cursor in vim?(not by line)

后端 未结 4 922
误落风尘
误落风尘 2020-12-15 22:07

if some lines are too long, it will be forced to be newlined.

for example, normally a long line will looks like this

1 first line
2 this is the long          


        
4条回答
  •  囚心锁ツ
    2020-12-15 22:24

    No, if some lines are too long and you have set wrap on they will be shown on "two lines", so to say, but there won't be a newline character between them. If you turn off wrap with set nowrap you'll see the effect.

    Normally, k and j move you up and down. If you want to navigate wrapped lines use gk or gj, or just as some like it, map it to for example, the cursor keys.

    nmap  gk
    nmap  gj
    

提交回复
热议问题