How to search Xcode4.2 project? - xcode

I'd like to run a search on all files in my project. How can this be done in Xcode please?

In Xcode 4, as Jano mentioned:
⌘3 (Command + 3) will show the Search Navigator
However:
⇧⌘F (Command + Shift + F) will open the Search Navigator with focus on the search field
Both of these keyboard shortcuts will bring open the panel you need to search in all files. This page on developer.apple.com shows a list of the keyboard shortcuts available in Xcode.
From that reference, the following are the other Find related shortcuts:
Find in Workspace… ⇧⌘F (Shift-Command-F)
Find and Replace in Workspace… ⌥⇧⌘F (Option-Shift-Command-F)
Find… ⌘F (Command-F)
Find and Replace… ⌥⌘F (Option-Command-F)
Find Next ⌘G (Command-G)
Find Previous ⇧⌘G (Shift-Command-G)
Use Selection for Find ⌘E (Command-E)
Use Selection for Replace ⇧⌘E (Shift-Command-E)

Related

Visual Studio CTRL + F but how to work it?

I know I can use CTRL + F to search selection, current documet, all open documents etc. But is there a way to work witch search bar only with keyboard? For example to switch between searching option, expand the search bar etc.?
not sure if you want to have a single KB shortcut for every type of search (current document, all open docs, etc). But after pressing Ctrl+F you can press Tab a few times until you navigate to the search scope DDL and then press ↓ or ↑ to select the needed option.
Will it be easier for you than using the mouse? :)

XCode 4 Show Files With Matching Names shortcut

XCode 4 (I use 4.3.3) has nice feature - in the bottom of most navigator panels (left panel) it has search field where you can write match expression to quick find entity you need. But I have not found any way to switch to this field from code area without using the mouse/trackpad.
Does anybody know a shortcut that calls in Preferences->Key Bindings ?
Cmd + alt + J
Opens the project navigator and highlights the search bar, ready to type.
Cmd + shift + J
Just opens the project navigator.
I use...
Command + Shift + O
This opens a dialog box where you can enter the required file name, it also does match expression.

Xcode - search text in all files

Is there a way to search through all Xcode project files? I know that I can find some text inside file with finder, but finding something with Xcode will be very helpful. When I press cmd+f I can only find or find and replace in current display file.
Use cmd + shift + f for complete Xcode search.
To do it simply from the UI, with a click
By default, this will be searching through the entire project searching for any files containing the specific string you entered.
From this point, you can start doing more stuffs like replace all, etc, like this
On the left hand side of the editor you have a magnifying glass. There's a search box there. That should do the trick. (it's called the search navigator)
cmd + shift + f opens it too.
cmd + shift + f
then press return key of you keyboard.
Use Command + 3 a minimum keyboard shortcut
or Command + Shift + f
In find use: Find > Text > Containing
Right Click on any text and select 'Find Selected Text in Workspace'
In my experience, cmd + shift + f requires cmd + c before hand to populate the search term. So, my go to search for text in all files is to do the above.

Xcode shortcut to open the document items list

Is there a keyboard-shortcut to open this awesome list (that I don't know the name of) ?
Thanks!
Try ⌃ 6
Also the other control + numbers to see the other dropbowns in that disclosure list.
You can see them and others in the Key Bindings section of Xcode preferences:

Xcode search by file or class name

I would like to search for all .xib files in a particular xcode project but I don't know how to do this on xcode. Also, suppose I want to search for a particular file, e.g. Test.h, how do I do this? I know how to do this using linux, but that gives the structure of the filesystem, and not of the xcode project.
In xcode on left pane at the bottom there is a search field, just type xib, it should list all xib files. Same with other type of searches as well.
Place your cursor in this "Filter" with a keyboard shortcut:
⌥ +⌘ + J , or by choosing from the File Menu Edit > Filter > Filter in Navigator
Edit:
You can even use wildcards. For e.g., *m*1.x* will filter SampleXib1.xib, It's also incase-sensitive.
To search a file/class ⌘ + ⇧ + O (Command + Shift + O)
To See the current opened file in Project Navigator ⌘ + ⇧ + J
To go to line number in a file use ⌘ + L
Note: This partially answers the question, to see all .xib you can search it in project navigator as mentioned by one of the answers. But I think these shortcuts are awesome!
Type your search keyword in the text field at the very bottom of the Project Navigator pane on the left.

Resources