Can you substitute or delete between commas (or any arbitrary character) in vi/vim?

后端 未结 4 879
日久生厌
日久生厌 2021-02-04 16:21

For example, I have text like this:

I talked to a friend, I hiked a mountain, I am working with blah blah, 

And I want to delete or substitute

4条回答
  •  野性不改
    2021-02-04 16:52

    there are plugins to let you create customized text object. without installing plugins, assume your cursor is between two commas, you could do:

    T,c,
    

    or

    t,c,
    

    to simulate your ci, for di, change the above c into d

    related help doc:

    :h t
    :h T
    :h ,
    

提交回复
热议问题