Reputation: 7874
I'm using Xcode 5, and want to find a word (ex:variable name) not by substring match but by exact match (or prefix match). In file wide search (Command-F), I can use Textual search or regular expression search by clicking the arrow button just right of the glass icon and choosing "Edit Find Options...". But, I cannot find any option to search on project wide search ("Find in Project", Shift-Command-F), in Xcode 5. One thing I can do is run "grep -w" on Terminal.app. But, isn't there any way to search word in Project inside Xcode?
Upvotes: 4
Views: 4659
Reputation: 53
In Xcode 6 the problem I was having was that my Framework folder wasn't being searched, even though it was clearly part of the project (but in /Library/Frameworks), and even when I had one of its files open with the string showing in the editor.
Changing the scope from In Project to My Scope (as shown) even allowed me to find the search string in non-frameworks folders.
Upvotes: 3
Reputation: 35636
Well it seems that the search tool in Xcode 5 is a bit confusing for a lot of people. In my opinion Apple should have done a better work letting the user know of what is clickable and what not... That being said, here is how you access the different options:
Once we switch to the Find Navigator
we see 3 components (Find
>Text
>Containing
)
Now, you can click on any of them to select between different options (à la jumpbar)
And finally you can also click the In Workspace
(or In Project
) to change the scope of your search
Upvotes: 24