Keyboard shortcut to find the currently selected text in Xcode 4

ughoavgfhw offered the correct answer (above). Use Cmd+E on the selected text to begin searching with that text. Then immediately type Cmd+Shift+F to search the whole project for all instances of the text hit enter.

This is quite quick, consistent, and sensible. It's not as immediate as Visual Studio's single-stroke Find/Find-in-Files—Xcode requires two strokes rather than one—but personally the extra step doesn't bother me.


Late to party but someone might benefit:

I use the free BetterTouchTool and define a custom shortcut for missing or awkward Xcode shortcuts. You can attach multiple actions to your custom shortcuts, I have assigned Cmd+E - Cmd+Shift+F - Enter to middle mouse button, it lets me search the selected text in workspace with a single click. You can assign the same actions to a keyboard shorcut though I like mouse buttons better for this task because I also do the text selection with mouse.

ps: BTT gives you the option to select in which application your shortcut will apply or you can make your custom shortcuts global, which I also find handy.


For me the best option was to go under Xcode>Preferences>Key Bindings and in Filter type "find selected text in workspace" and bind it to your desired key, I binded it to Shift+Ctrl+Option+Cmd+F

Note: I am using Xcode version 10.3