Xcode Tip: Command-E [#iosdev #xcode]

For the longest time, to perform a search in Xcode I would take a standard, yet uninformed, approach by selecting a desired region in my code, copy it to the clipboard with Command-C and then perform a Command-Shift-F to find all instances of the search in my project. Cool.

Then after a while I actually looked at the bottom of the Edit –> Find menu. At the end of the list there is an item entitled “Use Selection for Find” and its shortcut is Command-E.

The beauty of this command is that it puts the search term in a separate location preserving the contents of your clipboard.

This is particularly nice since now I can have text in my clipboard and still perform a search – a bit like having your cake and eating it too.

Thanks Xcode Team!