Vim,如何避免:set cuc 设置列号的副作用

Vim,如何避免:set cuc 设置列号的副作用

这可能是一个错误,但我不确定。通过 freenode 上的 #vim 中的用户 fow,我确认 7.3.409 中没有副作用,但在 7.3.547(我电脑上的版本)中有副作用。

最简单的测试方法是将以下文件复制粘贴到 vim 缓冲区中,跳转到开头(gg)并按照说明进行操作。

Hi there, this is a test case.
This line is short.

After opening this file issue the following commands:
$j:set cuc<Enter>k

You'll notice that the cursor should be on the period after "case" this is expected behavior.

Next enter the following commands:
:set nocuc<Enter>$hj:set cuc<Enter>k

You'll notice that the cursor should now be on the word "a" rather than on the "e" at the end of "case"

So when you have a column value (not end of line) then :set cuc modifies this value as a sideeffect.

有没有办法解决这个问题?这是一个错误吗?其他人可以重现吗?

相关内容