I'm editing an HTML file, and my cursor is inside a tag, like this:
<textarea class="code-area"></textarea>
And I'm trying to wrap all of this tag inside a div
tag, so that it'd be like this:
<div>
<textarea class="code-area"></textarea>
</div>
I can use vim-surround and type yss<div>
, but it'll change it into this:
<div><textarea id="code-area"></textarea></div>
How can I wrap it so that it adds newlines as well?
Also, the yss<div>
command only wraps the current line. I'm interested in wrapping an entire tag, no matter how many lines it has.
ySat<div>
fit?