本文介绍了Vim:更改/删除直到“块”结束。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果您有一段用方括号或引号引起来的文本,则可以使用

When you have a block of text delimitated by brackets or quotes, you can use

ci"
da(

等等,以更改该文本块。但是有一种方法可以更改或删除光标移动到该块的末尾(以 cw 表示单词的方式)?

and so on to change that block of text. But is there a way to change or delete from the cursor to the end of that block (in the way cw does it for words)?

推荐答案

使用 tf T F 的Benoit的答案是我所知道的最好方法。如果要删除括号块的末尾,可以使用]),这将考虑到任何嵌套的括号,还有一个相应的 [(]} [{

Benoit's answer of using t f T and F is the best way that I know of. When it comes to deleting to the end of a parenthesised block you can use ]). This will take into account any nested parenthesis. There is also a corresponding [(, ]} and [{.

这篇关于Vim:更改/删除直到“块”结束。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-12 05:17