我在 Mac 上,我将终端光标设置为竖线选项。然而,在 vim 命令模式下,光标是竖线,但它不会让我使用 hjkl 转到行尾,它总是在行尾之前停止。这尤其令人烦恼,因为您必须在插入模式下使用箭头键才能使光标到达行尾。任何修复将不胜感激
例如: hello world ,我想要的是 hello world |
我想你正在寻找set virtualedit=onemore
.
From :help 'virtualedit':
A comma separated list of these words:
block Allow virtual editing in Visual block mode.
insert Allow virtual editing in Insert mode.
all Allow virtual editing in all modes.
onemore Allow the cursor to move just past the end of the line
[...]
"onemore" is not the same, it will only allow moving the cursor just
after the last character of the line. This makes some commands more
consistent. Previously the cursor was always past the end of the line
if the line was empty. But it is far from Vi compatible. It may also
break some plugins or Vim scripts. For example because l can move
the cursor after the last character. Use with care!
我自己从未注意到任何问题,所以尽管有警告,它似乎还是相当安全的。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)