Sublime Forum

Hotkey to add a cursor

#1

Hey all, loving sublime so far!

There is a hotkey I’m not finding… which probably means it doesn’t exist yet. What I’d like to do is have some mode where you are moving around a block of code with one cursor, and pressing a key to mark a spot for a multi-cursor edit. When you have all the cursors added you press another key to start multi-editing.

Basically it would work like CTRL-clicking with your mouse, but you do it via the keyboard.

For example… given the following block of php code:

<?php
$myArray = array(
  'color'=> 'red',
  'size'=> 'medium',
  'age'=> 124,
);

Lets say my cursor is in front of the first “=>”. I want to move through the code with the arrow keys and drop a multi-cursor in front of the other "=>'s. Then, I press some key combo to actually start multi-editing … at which point maybe I’m just added a space in front of each ‘=>’.

Unrelated side question:
I know CTRL-F3 (windows) finds the next item matching your current selection… is there a way I can have that item added to the selection. Basically a version of ALT-F3 that selects matches one-at-a-time instead of just selecting all matches in the file?

0 Likes

#2

Select More (ctrl+d) ?

0 Likes

#3

That would actually be a nice feature. right now it seems your only real option is to use the mouse and ctrl+click

0 Likes

#4

Yeah, that sounds excellent. I’m not sure of a way to do that now.

[quote]
Unrelated side question:
I know CTRL-F3 (windows) finds the next item matching your current selection… is there a way I can have that item added to the selection. Basically a version of ALT-F3 that selects matches one-at-a-time instead of just selecting all matches in the file?[/quote]

Ctrl+d, it’s awesome.

0 Likes