Does anyone know of a pre-existing technique to edit multiple lines in VIM using Marks or something similar? I use Shift+I / Shift+A when visually selecting columns to insert before and after, it would be nice to something similar with "uneven" or "Jagged" lines.
Example of "Jagged" Lines:
<a href="new/link/"> same link </a>
<a href="new/link/to/another/area/"> next link </a>
<a href="old/link/same/content/"> same size </a>
<a href="interesting/tmp/same/info/"> size same </a>
<a href="to/a/great/place/known/the_same/"> what link </a>
<a href="another/new/link/"> this link </a>
<a href="into/links/"> some link </a>
In this example, I'd want to adjust the internal text of the link: "same link", "next link", "same size" etc.
This could easily be done with a regular expression, but would also be nice if it could be done with marks somehow.
Example Workflow:
:MarkInsertMode # << Something Similar to this, ideally mappedMost likely if there are no answers for this one I'll be writing a script to do it, but I'm curious if anything like this is out there so far.
The vim-multiple-cursors plugin was already mentioned in the comments. If the text you're editing is identical, an alternative is my ChangeGlobally plugin; which provides a new gc command that works like built-in c, but after leaving insert mode applies the local substitution to all other occurrences.
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