Search code examples
htmlvimeditor

Delete text in between HTML tags in vim?


I know

di<

will delete in an HTML tag itself.

Is there an easy way to delete text in between two tags?

<span>How can I delete this text?</span>

Thanks!


Solution

  • dit will delete the text between matching XML tags. (it is for "inner tag block".)

    See :h it and :h tag-blocks.