23

Does XCode 4 have keyboard shortcut for the two menu options: Edit > Find > Replace and Find Next / Previous?

If not, (1) why not, (2) how do I create them, and (3) which key combinations do you recommend for the shortcuts?

3 Answers 3

50

As for Find & Replace, they are provided by default now (version 4.2.1):

Find & Replace: Cmd + Option + F
Find & Replace in Workspace: Cmd + Option + Shift + F

1
  • This needs to be the selected answer. Easy and provided by default within Xcode. Commented Oct 18, 2020 at 22:53
15

As for Find next/Find previous, you should be able to use standard Cmd-G and Cmd-Shift-G Mac shortcuts.

But the keyboard shortcut for Edit > Find > Replace doesn't seem to be provided by default. However, you can set up one if you go to XCode 4 Preferences (Cmd-,) and then click Key Bindings. There are options available for Replace, Replace All as well as Replace and Find Next.

5

You can do that by

Find & Replace: Cmd + Option + F
Find & Replace(in Workspace): Cmd + Option + Shift + F.

Also you can change this control as per your preference by following these steps:
1. Xcode > Preferences
2. Select Key Bindings
3. Search for command you want to replace and then add a suitable combination.

Refer to the attached Image.enter image description here

Hope it helps. All the best

Not the answer you're looking for? Browse other questions tagged or ask your own question.