是否可以取消上述行为?
额外学分的任务:想办法强制 Vim 在退出插入模式后立即刷新光标位置。
虽然我不建议更改默认的光标机制,
实现相关行为的一种方法是使用以下内容
插入模式映射。
:inoremap <silent> <Esc> <Esc>`^
Here the Esc key is overloaded in Insert mode to additionally
run the `^
command which moves the cursor to the position where it
had been the last time Insert mode was left. Since in this mapping it
is executed immediately after leaving Insert mode with Esc,
the cursor is left one character to the right as compared to its
position with default behavior.
与其他一些解决方法不同,此方法不需要 Vim
编译与+ex_extra
特征。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)