Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 vim 中,如何ci(更改当前行括号中的内容,例如ci"更改引号中的所有内容?
我试过了
:nnoremap ci( f(lct)
但我的映射被忽略了。我不能像那样扩展内置命令吗?
还有什么方法可以结合动作吗?我可以做一些事情,比如c{f)hh}将所有内容更改为右括号之前的两个字符吗?
提前致谢。
ci(和的行为ci"是不同的,因为 vim 不认为引号(和单引号)必须成对出现,而({[<这样做。一开始这有点奇怪。
ci(
ci"
({[<
这个“问题”有许多“修复”。这是第一个想到的。