top | item 39860390

(no title)

innocenat | 1 year ago

Personally while there are some task that's easier with multiple cursors, I have personally yet to find any use case where regexp replace in selections doesn't work as well.

discuss

order

madacol|1 year ago

You cannot edit in real-time with regex

With regex, you need to plan everything you need to do and then surgically do it.

With multiple cursors, you only need to know (roughly) where you need to change, the rest you figure it out on the fly.

lf-non|1 year ago

In editors like vim/emacs it is possible and common.

germandiago|1 year ago

I find Emacs Macros and rectangular editing as more useful in lore situations than multiple cursors.

As for regexps, the syntax in Emacs is hell, but I do know Emcacs has very powerful edit/replace tools.

overtomanu|1 year ago

Multi-cursor is more flexible than rectangular selection. You can skip or delete words of varying length etc. It is certainly less powerful than vim macro and regex, but it's easy to use because 1) there are less shortcuts to remember 2) no need to think too much like figuring out regex for simple tasks 3) it gives instant feedback

Video showing this https://youtu.be/lhFNWTAIzOI?t=28

cylinder714|1 year ago

"Emcacs"...I like it.

edflsafoiewq|1 year ago

There's a reason people use visual editors and not ed.

treflop|1 year ago

Wouldn’t remotely compare regex to ed.

I also haven’t found a use for multiple cursors.

Writing a regex is quick and easy.