In Vim, how can I delete everything between quotes including the quotes?

后端 未结 3 1707
庸人自扰
庸人自扰 2020-12-28 12:42

For example, in the following:

Testing \"deleting\" within quotes

With the cursor inside of deleting, how can I delete the text within the

3条回答
  •  不思量自难忘°
    2020-12-28 13:04

    Keep your cursor in first quotes and press d, then type /"/e It should delete the content between both double quotes as well as quotes. This is applicable for muliple lines as well.

    Another way: Keep the cursor in first quotes and type df" It will also delete the text inside quotes and quotes too! Not applicable for multiple lines.

    In both the ways, you execute commands in normal mode.

提交回复
热议问题