Remix.run Logo
gesis 4 hours ago

I am so used to sed-style, regex powered find/replace, that this use admittedly never occured to me. As a result, multi-cursor seemed mostly useless outside of pair programming that I never do.

I will have to try it out once it lands in neovim just to see if I can wrap my muscle memory around it.

steve_adams_86 4 hours ago | parent | next [-]

I've always told myself I should learn to do these sed/regex find and replace techniques, but my origins are not sophisticated and I use computers like that orangutan hammering nails in the video with David Attenborough https://youtu.be/IFACrIx5SZ0?si=NcWGBNq272KoYB2i&t=84

It's entirely possible that you don't need multiple cursors

runevault 4 hours ago | parent | prev [-]

For me the nice thing about multiple cursors is when it would take more time to write the regex than it does to just throw down say 8 cursors and update the spots.

wredcoll an hour ago | parent | next [-]

How do you place the cursors then?

hiccuphippo 26 minutes ago | parent [-]

In vim?

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.

skydhash 3 hours ago | parent | prev [-]

There’s an overlap between “Find and Replace” and Macros, but it’s too small for multi cursors to be particularly useful for me. Especially with emacs where I can bring up all the lines in a separate buffer and edit them there (occur-mode) or do the same for a set of files (grep-mode and wgrep)