Multiple cursors / highlight next instance of currently highlighted word Multiple cursors / highlight next instance of currently highlighted word xcode xcode

Multiple cursors / highlight next instance of currently highlighted word


It is possible starting from Xcode 10 Beta 3

You can add selections for the next and previous find results usingthe “Find and Select Next” and “Find and Select Previous” menucommands.

Additionally, you can quickly add selections for the next and previousoccurrences of the current selected text using the “Select NextOccurrence” 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!


If what you're wanting to do is change the name of a variable, then when your cursor is on the variable press control+command+E and type away. (This is "Edit All in scope")

For editing on a Project scope there is always the Editor > Refactor > Rename menu item


Highlight the word you'd like to get the next instance, then press:

+ E

and

+ G.

Continuing to press + G will cycle through all instances of the word you pressed + E on.

I have more xcode shortcuts on my site that I sometimes reference.