Let's say I have a tag (and cursor at *):
<h1 class="blah" id="moo">H*ello!</h1>
I want to change it to:
*<h2 class="blah" id="moo">Hello</h2>
i.e. Change the type of tag, but keep all the elements.
Using surround.vim, I could do:
cst<h2>
but that changes the HTML to:
*<h2>Hello</h2>
Is just changing the tag possible, but keeping all the attributes? Surround documentation doesn't seem to contain anything like this...
Replacing tag while keeping attributes has been added to Surround.vim
cst<p>
replaces whole tag, while cst<p
(without closing bracket) keeps attributes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With