bPizzi
bPizzi

Reputation: 1025

Vim : changing text between html tags

I just wonder how to change the text between html tags right from the normal mode, like the way we can change text within double-quotes thanks to ci" ?

Upvotes: 66

Views: 9971

Answers (2)

Andrew Langman
Andrew Langman

Reputation: 1771

For working between tags replace the " with a t, as in cit. Or dit to delete between tags and remain in command mode.

As you may already know, you can do ci[, ci{, or ci( to work between matched square or curly brackets, or parentheses. These commands also work with the closing character, so you can do ci], ci}, or ci).

Upvotes: 116

Tomalak
Tomalak

Reputation: 338208

cit

Mnemonic: "Change Inner Tag" -- This obeys tag nesting, as well.

Upvotes: 51

Related Questions