Is it possible to find and replace in selected text in Snow Leopard Xcode 3.2? There always use to be an option for selected text. Really frustrating. Thanks.
4 Answers
Yeah, but it's a lot less obvious now. If you have the "Find" bar up, change the first dropdown menu to "Find & Replace". Then, if you hold option, the "Replace All" button turns into an "In Selection" button.

- 4,831
- 2
- 27
- 27
-
1Aah, the magic option button. They should tell us about this stuff. Thanks, saved my day (and about 5 other programmers in the room here). – damian Jan 15 '11 at 18:22
-
4No problem. Apparently, to do something on your Mac that should be possible but doesn't seem possible, try Option. Another example: maximizing iTunes using the green + button. – No Surprises Jan 17 '11 at 23:29
In XCode 5 and earlier you can highlight a word and hit CMD+CTRL+E and then simply edit the word in line and it applies your edit to all occurrences of that word in the document.

- 10,930
- 1
- 56
- 72
You can press Command+Ctrl+F to bring up directly the Find & Replace bar, and press Escape to remove it. I don't think there's anyway to activate the "Replace All" button using the keyboard, but then again there never was afaik.

- 21
- 1
Sometimes an image helps make things a little easier to grasp quickly. So this is to supplement the chosen answer.
And holding down Option:

- 484,302
- 314
- 1,365
- 1,393