Remix.run Logo
eviks 2 days ago

You'd do text editing with it with the coolest feedback loop - immediately seeing the changes and what those changes apply to beforehand, that's different from having to repeat some macro multiple times

dizhn a day ago | parent [-]

Highlighted search/replace does this pretty well too.

eviks a day ago | parent [-]

Not really, it only does it for the first edit, while multiple cursors offer continuous feedback for all further besides, search/replace has extra toolbar and usually can't as easily select, for example, "current Identifier under cursor" if those are different, so it's worse before the first edit as well

dizhn a day ago | parent [-]

I'll have to try that out sometime. Never used multiple cursors. However, search/replace with vim/neovim isn't just the first edit either. It highlights all matches and shows you the proposed changes as you type as well. (It is probably a configurable thing).

eviks a day ago | parent [-]

How can it show proposed changes if search doesn't match anymore after edits?

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

dizhn a day ago | parent [-]

I am not saying it's better or you shouldn't use multiple cursors. It does help a lot as opposed to the old way of not seeing what would have been changed.

How does multiple cursors work anyway? How do you place them? By search? Is it used for anything other than working on matching text?

eviks 20 hours ago | parent [-]

Your place them via search, manual click, extending up/down the line, via "match current word"

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

dizhn 20 hours ago | parent [-]

I can picture it better now. Thanks.