(Question mark in title because I'm not sure what to call it.)
Sublime Text has a cool niche feature where you can have multiple selections. Just hit Alt+Shift+Up/Down, and you'll spawn a second cursor in the line above/below your current one. This is useful when you have some code or other data organized into a nice structure, and you want to make the same edits across multiple lines.
What I just discovered today, though, was that multi-select intelligently handles copy/paste, too.
I had a list of urls, and I needed to wrap them in
<a>s so that they both linked to the url and displayed it as their text.
- Kick off a multi-select for all the lines.
- Highlight all of the urls (they were all the same length, luckily)
- Move back to the beginning of the lines and start typing the
<a href="">part (every line gets this)
- Move the cursors to between the
""in the attribute.
IT JUST MAGICALLY WORKED. Each line pasted the data from its respective line, rather than (as I feared might happen), each pasting in the entire set of urls, or maybe all pasting the first or last url.
Sublime is one of those delightful and rare programs that just does what you want a surprising amount of the time.