Selection – How can I select an HTML tag’s content in Vim?

Is it possible to select an HTML tag’s content in Vim?

For example:

<p>I am a silly butterfly</p>

I would like to select “I am a silly butterfly”.

I know that you can use vi" to select text inside quotes, brackets, etc. The problem here is that the text inside the HTML tags is not really within anything that I can use the i function for.

Solution:

You can use vit to visually select text in a tag. See

:help v_it
πŸ’ 

πŸ”΅ Best-selling hard drives, USB flash drives & SSDs everyone's buying.

Fast, reliable, and on sale now. Thousands pick these weekly β€” don't miss Amazon's lowest storage prices.

⚑ Top 10 Bestsellers
πŸ† 4.7β˜…+ Reviews
πŸ“¦ Prime Shipping
πŸ‘‰ See today's best-selling Data storage on Amazon.com HDD Β· USB Flash Drives Β· SSD Β· External Drives
πŸ›’
βœ… Updated hourly β€” Amazon real-time ranking πŸ”₯ Limited stock deals πŸ”— Affiliate
⭐ Click to see complete best-selling list ⭐
Scroll to Top