gpt4 book ai didi

vim - 在 vim 中,为什么 c_ 表现得像 cc?

转载 作者:行者123 更新时间:2023-12-04 19:49:24 26 4
gpt4 key购买 nike

如标题。

因为 _ 是到行中第一个非空白字符的移动,而 c + movement 通常意味着更改(又名删除 + 进入插入模式)从光标到移动的缓冲区,为什么这不起作用?它似乎删除了整行,而不是从光标到行的开头(又名 ccC)。有替代方案吗?

最佳答案

这是 vim 中的一个已知问题。参见 https://github.com/vim/vim/issues/2189#issuecomment-334441965 :

_ is a linewise movement (I guess because of VI compatibility). All commands (like d or c) that are combined with a linewise movement affect whole lines. You can make the movement (in combination with a command) characterwise by prefixing it with v. So cv_ and dv_ should do what you want.

关于vim - 在 vim 中,为什么 c_ 表现得像 cc?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47986525/

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