Multi cursor is the feature that increased my productivity the most across the board.
Especially as code is formal notation, such that it’s structured quite rigidly, macros composition can be seen as a meta language. Multi cursors is more suited for the “work hard, not smart”, like preferring litteral search instead of learning regex.
(Just like searching with / replaced 98% of my navigation)
Editing something without having to actually place the cursor anywhere is a killer feature
Also neovim can show you your substitutions live, no need for a plugin anymore. It's the default.
Since VS Code is already an inefficient way to move around a code base, I don't think we should take any lessons seriously outside of how useful the LSP protocol become for adoption.
P.S.: multi-cursor is not about moving around the code base and therefore not taking lessons about navigation has no impact in this matter.
2) Regex is great, and vim is a good place to exercise the “try a regex” reflex. And on the regular old bash command line, it is great for making stuff like locate more precise.
That said, I do find myself using recursive macros quite often. They're an easy way to make a set of random little changes which would be hard to put into a solid regex. Especially when filtering and formatting logs to produce a list of error messages on a condensed format for review. It doesn't happen as often, but I also find them incredible when doing more complex substitution across a project.
Here’s a video example [2]:
[1]: https://neovim.io/doc/user/usr_10/#_visual-block-mode
[2]: https://www.reddit.com/r/vim/comments/jai57c/the_usefulness_...
I will have to try it out once it lands in neovim just to see if I can wrap my muscle memory around it.
Ctrl+v, 8, j, shift+i, add the text, Esc.
Which works if you need to edit several aligned lines in a row. The one thing I'm missing is putting the cursors on the next found position of a search term which would make it much more useful.
It's entirely possible that you don't need multiple cursors
If those places can be created automatically then again it's just a macro you execute over many lines.
You search for OLD, replace it with NWE, then notice the typo, delete 2 chars and type EW. How can search and replace help you here without searching for NWE anew?
Yeah, do try it out to at least see the difference
How does multiple cursors work anyway? How do you place them? By search? Is it used for anything other than working on matching text?
And it's also used for new text entry, not just editing matching text, e.g., add an extra field to each of these 5 arrays
Otherwise, as a sibling comment said, incremental search/replace is your friend.
So you either cycle through cursors (if your editor has a concept of "primary cursor") to see before/after or you do it blindly and accept a chance to be wrong
Much more powerful than "change all my selections to the next input" IMO.
Oh neat!