← Back to context

Comment by themadsens

18 hours ago

Whats with all the fuss over multicursor. How is this different from just using '.'

dot repeat is the wrong comparison. A closer one would be macros, but even then a good multiple cursors implementation is often faster, more intuitive, and requires less cognitive overhead. One of the better examples of the usefulness of multiple cursors is from Emacs Rocks (link goes to 0:23):

https://m.youtube.com/watch?v=jNa3axo40qM&t=23s

  • What do you when the things you want to change don't all fit on the screen at once?

    • That's one challenge I haven't seen editors tackle correctly by, e.g. having some special condensed view where only lined with cursors are shown so you can see more cursors on the screen and easier scroll around to see even more skipping the rest of the text (like some git diff tools do, showing only diffs with minimal context)

      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

    • At least in e.g. Emacs and sublime text, you can mark all occurrences throughout the entire file. Assuming the matches are similar enough that the same motions apply even if you can't see the cursor, you can perform those operations.

      Otherwise, as a sibling comment said, incremental search/replace is your friend.