Prevent cursor from moving back one character on insert mode exit

前端 未结 6 1374
南笙
南笙 2020-11-29 21:35

...how would you do it?

task for extra credit: figure out a way to force vim to refresh the cursor position immediately after exiting insert mode

6条回答
  •  囚心锁ツ
    2020-11-29 22:10

    I do believe the proper way to do this is

    au InsertLeave * call cursor([getpos('.')[1], getpos('.')[2]+1])
    

提交回复
热议问题