0

In Xcode 3 I use to be able to select some text, right click and search for that text.

However in Xcode 4 this seems to have disappeared ?

Is there a quick alternative instead ?

EDIT I'd select some source code and it would find all occurences in the rest of the source code.

sorin
  • 161,544
  • 178
  • 535
  • 806
Jules
  • 7,568
  • 14
  • 102
  • 186
  • Can you be more specific about what you mean by "search for that text"? For example, after selecting some text and right-clicking in Xcode 3, there's `Find in Project`, `Find Text in Documentation`, `Jump to Definition`, `Search in Spotlight`, and `Quick Help`. – NSGod Apr 21 '11 at 17:14

5 Answers5

4

Select text; cmd-E

Then Shift-cmd-F; return

Boom.

Graham Perks
  • 23,007
  • 8
  • 61
  • 83
1

Select your text, hit command-E ("use selection for find") and command-G to iterate through results.

Stripes
  • 4,161
  • 2
  • 25
  • 29
  • Hmmm, that only searches within the current file, not other source files / project :( – Jules Apr 27 '11 at 17:55
  • I thought you only wanted in a single file. Shift-cmd-F is needed to do a multi file search, if you do the cmd-E first the S-C-F will be populated with the text you want so you can just hit return. – Stripes May 03 '11 at 00:01
1

Find in Workspace appears to be fundamentally broken in Xcode 4.

Someone else posted a workaround: toggle the Assistant Editor button to enable the menu item. However it still is not available for text in the debug output area.

northernman
  • 1,446
  • 16
  • 19
0

You can always try some keyboard shortcuts combination once your text is selected:

  • command+C
  • command+F (if you want to search in the current file, otherwise shift+command+F to look into the whole project)
  • command+V

Then you can iterate through the results with command+G to go forward or shift+command+G to go backward.

Hope this helps.

Adam Millerchip
  • 20,844
  • 5
  • 51
  • 74
Hugo Briand
  • 1,683
  • 20
  • 27
0

Search in workspace (you can read the keyboard abbreviation in Edit -> Find -> find in workspace

albianto
  • 4,092
  • 2
  • 36
  • 54