Multiple cursors / highlight next instance of currently highlighted word

Matt Rowles picture Matt Rowles · Jul 22, 2014 · Viewed 23.9k times · Source

In Sublime Text, it's easy to select the next instance of a word by pressing command + d and also place multiple cursors by pressing command & clicking. I know I'm not alone in saying this is an incredibly useful function in editors.

I haven't had any luck in finding any key mappings or Alcatraz plugins for this, so I was interested to see if either there is a way to do this in xcode 5 which I might have missed or if there are plans to implement this in xcode 6?

If there isn't, and any xcode developers see this, would love to see this as a feature and hear your opinions on it :)

Answer

Infinity picture Infinity · Jul 6, 2018

It is possible starting from Xcode 10 Beta 3

You can add selections for the next and previous find results using the “Find and Select Next” and “Find and Select Previous” menu commands.

Additionally, you can quickly add selections for the next and previous occurrences of the current selected text using the “Select Next Occurrence” and “Select Previous Occurrence” menu commands.

E to select next occurence of currently selected

E to select previous occurence of currently selected

G to find and select next

G to find and select previous

You can also use the Find menu to find these actions. Of course, feel free to bind it to different hotkeys!