News for hackers. Stuff that matters.
Re:Disassembling Sublime Text by shalabhc on Sunday December 04, 2016 @03:22PM (#13101605)
What are the main use cases of multiple cursors? It seemed like an interesting feature, and I'm curious why it would be considered essential.
Re:Disassembling Sublime Text by TeMPOraL on Sunday December 04, 2016 @03:56PM (#13101730)
I use them very often in Emacs instead of keyboard macros. They are useful whenever you have to perform the exact same operations in several places simultaneously visible on the screen[0]. By operations I mean both simple ones, like writing something, and more complex ones, like navigating/deleting whole words (of different length), etc.

Mostly I use it for quick renaming of variables, string fixes, and some structural changes in code.

--

[0] - multiple cursors, at least in Emacs, can work off-screen too, but I don't like not seeing what's going on when I do changes.

Re:Disassembling Sublime Text by NoGravitas on Monday December 05, 2016 @07:55AM (#13105035)
I also do this, though I use iedit-mode rather than multiple-cursor-mode.

However, I do like to point out that it's really just eye-candy for stuff I was already able to do in emacs. Previously, I would have used either keyboard macros or query-replace-regexp to do the same things.

Re:Disassembling Sublime Text by TeMPOraL on Monday December 05, 2016 @08:01AM (#13105059)
I second it. I too used either keyboard macros or query-replace- commands before. Multiple cursors is just nicer for these particular things.
Re:Disassembling Sublime Text by wishinghand on Sunday December 04, 2016 @03:39PM (#13101669)
It's basically a visual regular expressions. So I'll caveat my original statement that if you don't know regex, you need it. I never learned regex because I came from a self-taught, web development oriented background. So if I need to replace all instances of a variable, then go to the end of the line they were on and type in a different variable name or add a semi-colin, that's what I use.
Re:Disassembling Sublime Text by madeofpalk on Sunday December 04, 2016 @04:09PM (#13101787)
Lots of little things. Select a multiple lines of an object/hash/dict, break into multiple cursors, rewrite line (copying and pasting as needed, it works that out as well) to change to variable declarations, or to add a comma, or to... whatever.
Re:Disassembling Sublime Text by breck on Sunday December 04, 2016 @05:21PM (#13102100)
I often use "multiple cursors" as vertical cursors, to indent or dedent a whole block of code 1 space at a time. Often useful for contexts when shift+tab/tab doesn't work.
Re:Disassembling Sublime Text by euyyn on Sunday December 04, 2016 @04:01PM (#13101749)
For me it's mainly part of this sequence:

Ctrl-F <search query> SelectAll <edit with multiple cursors>

Do it all the time.

Re:Disassembling Sublime Text by heartbreak on Monday December 05, 2016 @12:54AM (#13103650)
I love the CTRL+CMD+G route as well. Use it constantly when refactoring.