gpt4 book ai didi

vim - 在VIM中,为什么光标随着4yk而不是4yj移动?

转载 作者:行者123 更新时间:2023-12-05 00:47:50 24 4
gpt4 key购买 nike

要从当前位置 + 当前行拉出 4 行,我可以使用 4yk , 并从当前位置 + 当前行拉下 4 行,我可以使用 4yj
但是4yk移动光标,而 4yj没有(至少在我使用的 vim 版本中,neovim)。

为什么是这样 ?

最佳答案

光标移动到 Action 的第一行。

4yk (或任何类似的向上运动),运动的第一行与当前行不同,因此光标移动。

4yj (或任何类似的向下运动),运动的第一行是当前行,因此光标不会移动。

来自 :help operator :

After applying the operator the cursor is mostly left at the start of the text
that was operated upon. For example, "yfe" doesn't move the cursor, but "yFe"
moves the cursor leftwards to the "e" where the yank started.

关于vim - 在VIM中,为什么光标随着4yk而不是4yj移动?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50780122/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com