How can I select an HTML tag's content in Vim?
You can use vit
to v
isually select text i
n a t
ag. See
:help v_it
Here are the steps:
- Place the cursor on the tag.
- Enter Visual mode by pressing v.
- Select the inner tag block by pressing i+t (or a+t for outer tag block).
at a
<tag> </tag>
block (with tags)it inner
<tag> </tag>
block
See more at "How to jump between matching HTML/XML tags?".