chocolat-public icon indicating copy to clipboard operation
chocolat-public copied to clipboard

Duplicate cursor -- multicursor without the mouse

Open atg opened this issue 12 years ago • 8 comments

Add a keyboard shortcut that would:

  1. Add another cursor in the same place as the current one
  2. Focus on it

The user could then move the new cursor around, then press another shortcut to jump out of multicursor focus mode.

atg avatar Jun 29 '12 13:06 atg

That method allows precise cursor placement, but it involves so many steps that would be faster to use the mouse for that purpose. It would be more usable if it worked with just a modifier-shift-up/down. It allows the selection to be expanded up and down and it's really fast.

http://www.youtube.com/watch?v=HBwaEGbT7Zo

franciscolourenco avatar Jun 29 '12 14:06 franciscolourenco

+1 for a keyboard shortcut!

90% of the time I want to create multiple cursors on all n lines above or below the current cursor, usually for between 3 and 50 lines, so I can insert/delete text on all the lines at once.

It would be fantastic if I didn't have to click all 3 or 50 times, and could just use a Modifier+Up/Down instead. Since most modifiers are already taken, it would probably have to be something like Cmd+Opt+Shift+Up/Down, or else Cmd+Ctrl+Shift+Up/Down.

Also, would be fantastic if this (and the click-to-add-cursor) would also add whitespace to the end of a line if the new cursor is beyond the end of a line.

mjbaldwin avatar Jul 17 '12 16:07 mjbaldwin

@mjbaldwin You don't have to click 50 times, just hold alt and drag.

Alternatively, select from the start point to the end point and press alt quickly.

atg avatar Aug 04 '12 14:08 atg

@fileability the limitations of the way the last one is works are the impossibility to expand the selection in both directions and the lack of explicit feedback on what the result of the selection will be.

franciscolourenco avatar Aug 04 '12 15:08 franciscolourenco

Son of a gun. Thanks, @fileability for the tip! That's a big help. :)

mjbaldwin avatar Aug 07 '12 13:08 mjbaldwin

The Select+Alt is great, but a Modifier+Up/Down would still be really useful.

Also, Atom has a super handy multicursor shortcut that selects the word where the cursor is (Cmd+D), and then selects another matching string for every time the shortcut is pressed and give you a cursor at each selection.

aaronmoodie avatar Jan 25 '16 22:01 aaronmoodie

@aaronmoodie you can do ctrl-F to do that!

atg avatar Jan 27 '16 21:01 atg

@atg Is there any way to just make esc the key command for exiting multi-cursor?

aaronmoodie avatar May 18 '16 03:05 aaronmoodie