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

后端 未结 4 935
误落风尘
误落风尘 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:23

    To move in vim in a natural way is possible.

    What I did was, and I suggest you, to modify (or create) your "~/.vimrc" and add these two lines:

    map  g
    map  g
    

    This will map you control-up and control-down to the movements commands (this is coherent with control-right and control-left to move around long lines)

    If you add these other two lines, you can use the same command to move in insertmode:

    imap   g i
    imap   g i
    

    (VIM is great !)

    Greg Ruo

提交回复
热议问题