I have been using multiple cursors with ALT + SHIFT
. Sometimes I need like 20 cursors and I want them at the start of the same portion of text. This is tedious to do every time. Is there a shortcut for this? Like imagine there are 20 instance of the text "foo" in the file then I would like to just select one and ideally it should automatically insert a cursor for all the other instances in the same position.
Asked
Active
Viewed 3,980 times
6

dfasdflskladf
- 101
- 1
- 6
1 Answers
12
Look for the Select Next Occurrence option.
On Mac it's used by selecting a word and then ^ G
, on Ubuntu the shortcut is ALT + J
.
Traverse through every item you wish to change by repeating the key combination.

timr
- 6,668
- 7
- 47
- 79
-
dude, you just saved my life! – dfasdflskladf Dec 18 '18 at 16:09
-
2How to undo this option in mac – Savad Feb 27 '20 at 11:34
-
You can just press ESC – timr Feb 28 '20 at 19:50
-
2For what it's worth, it's `ALT + J` on Windows as well. – Bink Mar 28 '20 at 21:59
-
1@Savad you can undo this operation on mac using control + shift + G – Mieszko Koźma Aug 23 '22 at 07:40