Where developers come to connect, share, build and be inspired.

88

VIM : edit inside a HTML Tag

3283 views

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.

Comments

  • Oud1-small
    hasenj

    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.

  • Blank-mugshot
    kormie

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

Add a comment