Vim : changing text between html tags

Vim

Vim Problem Overview


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" ?

Vim Solutions


Solution 1 - Vim

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).

Solution 2 - Vim

cit

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionbPizziView Question on Stackoverflow
Solution 1 - VimAndrew LangmanView Answer on Stackoverflow
Solution 2 - VimTomalakView Answer on Stackoverflow