vim-surround
vim-surround copied to clipboard
How to change tags in visual mode?
hi,
here is an example:
<firm>
<legend>Contace details</legend>
<label>
Email:
<input type = "text" name = "email" /><br />
</label>
</firm>
I want to change the <firm> into <form>
first, I select the body(multiple lines) surround in <firm> and let vim go to visual mode,
but how can I change <firm> to <form> in visual mode? (similar to cst in normal mode)
Thanks in advance:)
+1
What? Why can't you just leave visual mode?
I think you can do this with dst or cst
positioning the cursor is essential to this.
I know the following is not what OP asked but it fits the question title: When in visual mode (block or line), is there a way to change the surrounding for each line?
Let's say I want to go from
<p>One</p>
<p>Two</p>
<p>Three</p>
to
<li>One</li>
<li>Two</li>
<li>Three</li>
Is there a way to do that in visual mode?
Currently, I do that in normal mode with cst< and repeat the command with dot from vim-repeat (thanks for all those great plugins!).