Vim: changing/deleting up to the end of a “block”

前端 未结 4 2070
感动是毒
感动是毒 2021-02-01 07:11

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

ci\"
da(

and so on to change that block of text. But is there a wa

4条回答
  •  梦如初夏
    2021-02-01 07:33

    See the "Text object selection" section of the Vim help. You can define the selection sequences there with delete and change operations. It shows how to select blocks delimited by any of the following (and more):

    • {}
    • ()
    • Quotes (' or ")

    For example:

    d} and c} will delete and change from the cursor to the end of the paragraph.

提交回复
热议问题