In Xcode 3 I 开发者_Go百科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.
Select text; cmd-E
Then Shift-cmd-F; return
Boom.
Select your text, hit command-E ("use selection for find") and command-G to iterate through results.
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.
Search in workspace (you can read the keyboard abbreviation in Edit -> Find -> find in workspace
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.
精彩评论