Xcode search just isn't working the way I expect it to. What am I doing wrong?
"Project Find" (cmd-shift-F) often turns up zero results when I KNOW that there are valid hits. For example, searching for "Search Results" (no quotes) ironically returns 0 hits, even though I have a .m project file open with the string #"Search Results" sitting right in front of me. My Find Options are set as loosely as i can make then, case-insensitive, Search In Open Projects, All Candidate Files, All Files in this Project, etc.
The Search bar in the upper right of my main project window doesn't seem to behave like Project Find, nor does it seem to search the currently open document. What does it do?
Searching for "UIView" in the Help menu search turns up zero hits, even though if I open up the Developer Documentation from the Help menu and search from that window it returns plenty of hits.
Help menu searches only for menu entries (try searching for "Paste") and end-user documentation (how to use the software itself, not how to develop it).
Use documentation viewer to search within developer documentation (it lets you switch between fulltext and API names search, select OS version and language).
Check what options you've set in project search – it might be set to match whole identifiers only, be case-sensitive, search only selected files, etc.
Select:
In Project
Textual
Contains
Ignore case
Uncheck:
Display Resutlts in Find Smart Group
This might help :
If you are searching files in project then select "Ignoring case". Below is screenshot for the same.
If you are searching a particular file then select magnifier -> Edit finding option.. -> Select/Unselect Matching case accordingly. Below is screenshot for the same.
In my case the Pods project had an issue and Xcode could open it. Thus, although the files were there, Xcode could search through them.
Related
In JetBrains IDE's - in particular AppCode or Intellij - there is a Find Anything command that is Command-Shift-A that allows searching for any IDE related Action in a convenient modal dialog. Is there an equivalent in the Xcode?
An example use-case: there are SOF answers mentioning Solution -> Open Target. I can not find either Solution or Open Target in the Menus. I even employed the CheatSheet application and pored over every available shortcut. If there were a Find Anything then I could put in the terms Solution and/or Open Target and a list of related Xcode/IDE actions would be presented.
Pressing command+shift+f will jump you to the “Find navigator” where you can search through your current project. This is great if you want to do free-form searches anywhere in your project and includes options for case sensitivity, context (e.g. search for anywhere for text or just expressions beginning with the search term), regular expression searches, etc. See Find and replace content in a project.
The command+shift+o (the letter “o”, not the number zero) will pull up the “Open Quickly...” search dialog where you can search for symbols in both your project as well as the frameworks. See Open a file containing a symbol.
The Xcode replacement for Android Studio's/Jetbrains "Find Anything" command (which is not the Quick Open) is:
command + shift + ?
This opens the Help menu ready to type into the Find Anything search, where you can search for Xcode's own commands, for example Reveal:
I develop WPF and Silverlight application so I use source file links a lot. When I search for something, Visual Studio displays multiple same results in Find Results window - one for each file link which looks quite cluttered.
Is there a way (setting/plugin) to make the search results in Find Results window distinct?
If you are searching C, C++, or C# code consider using the Sando Code Search Tool (a free, open-source extension for Visual Studio). It eliminates duplicate results in many cases, only returning a single result for each program element (i.e., class, method, or field) that is relevant.
Here is an animated gif of it in action:
Full Disclosure: I am the project lead for this extension so I may be biased :)
I did one more search in Visual Studio gallery and I've eventually found what want: Ultra Find
It offers a few more features than the standard VS Find in Files but more importantly it shows only distinct results for linked files!
There are much better "find" or "navigation" plug-ins out there. I personally use ReSharper's Navigation and Search features to find whatever I need within a few keystrokes.
CodeRush and JustCode have similar features, too.
By selecting "Display file names only" in the options for "Find in files" it limits the results list to unique entry per file with matches.
This may be a more useful view of the search results for your usage?
I recently noticed that when I select a word and press CTRL+F3 in VS2008, it searches for that word in the whole solution, and the following appears at the status bar: Find "XXXX", Match case, Entire solution.
When I do the same thing in VS2010, I get to search only in the current document, not the complete solution. I want the same behavior in VS2008, and in fact, I thought, that is the default behavior in VS2008 as well. May be I did something ... anyone knows how can I get back the behavior of searching only in the current document using CTRL+F3 in VS2008?
Ctrl+F3 uses the last-used settings from the search dialog. If you open that up (using Ctrl+F) and change the "Look in" option to "Current Document", it will then search just within the current document next time you do Ctrl+F3.
I just upgraded to Xcode 4 (from 3.2.4) and while there are a lot of behavior/preference changes I need to get used to, I'd like to get a couple issues handled sooner rather than later.
Can I exclude the delimiters when balancing delimiters? In v3.x, you could balance delimiters and the selection would exclude the enclosing braces. Is that possible with v4?
Is there an equivalent to the advanced find/search available in v3? Used to ctrl-click on a symbol and select search in project which opened a new search window. You could also define different search sets to use when searching. I can't find any similar behavior in v4.
Finally, does anyone know if the Apple developer forums are available to users who have only registered as a developer (but not joined)?
Thanks!
Under the Help menu in Xcode 4 there is an option for Xcode User Guide which covers what you can do with Xcode 4. I have been through it and it seems pretty light so far so it may not have what you need, but it is a good place to start.
I also did a search in Help and quickly found that you can change this setting with a checkbox in Preferences under Text Editing. I've included a screenshot with the option highlighted below.
When in Xcode editing code for my objective C files, I often press Command-F to bring up the little Find-In-Document banner across the top. Sometimes this gets stuck in case-sensitive search, and when it does that it also won't loop through the entire document and sometimes won't even display the selected found string.
I can't find any options to turn off the case sensitivity, and I never intentionally turned it on. I've restarted xcode several times hoping that would be it but it's changed nothing.
Slightly off-topic, but this was the best place I could think of to ask this question. Thanks for any response!
EDIT: I've also tried restarting the computer. Still no dice. Also this happens on any project I open in xcode and is not specific to one project.
Anna's comment is the correct answer: When you press Cmd-F, clicking on the little magnifying glass next to the search input brings up a menu where you can check/uncheck Ignore Case.
You can set parameters for search by clicking on magnifier placed in left-side of search-bar.
There is provision to select/de-select "Match Case" i.e. case-sensitive search on pop-up shown.
Below is screenshot for the same.