VIM : edit inside a HTML Tag


We can edit the text inside a tag by cit (change inside tag)

<li> He | llo </li>

enter cit and now we have

<li> | </li>

Similarly, we can yank and delete inside the tag ( yit and dit )

Note: | is the cursor.

2 Responses
Add your response

Oud1 small

also, cat/yat/day works on the entire tag and its content (i.e. as a whole element) starting from the < of the opening tag to the > of the closing tag.

over 1 year ago ·

my favorite is guit/gUit to downcase or upcase everything in a tag

over 1 year ago ·