Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode question: Quickly jump to a particular selector/class/symbol?

What is the quickest way to jump to a particular symbol/selector/class in Xcode? (I'm looking for keyboard shortcuts preferably).

Right now, I know two ways of doing this:

  • “Open Quickly” > Click on the Symbols dropdown menu at the top of the editor > Select the selector to jump to it.
  • Click on “Project Symbols” in the “Groups and Files” section on the left sidebar, and type in a name in the Search text field in the top right of the XCode window.

Is there a quicker way of doing this? (If I could even assign a shortcut to jump to the “Project Symbols”, that would suffice for me. Alternatively, if I can find a keyboard shortcut to jump to the symbol dropdown above an editor that would do it to).

For experienced Xcode programmers, what do you use to jump to a symbol?

like image 425
Debajit Avatar asked Jul 11 '09 20:07

Debajit


4 Answers

In Xcode 3.2, the "Open Quickly" command (Shift-Control-D) lets you type in selectors and class names as well as file names. This would at least get you close to what you wanted.

Your idea about using the "Symbols" drop-down also works. You can use the keystroke Control-2 to bring up the Symbols drop-down menu, and then use the arrow keys, or start typing the name of the method that you want to reach.

Edit: In Xcode 4, the "Symbols" drop-down appears when pressing Control-6. You can change this in the Xcode settings by changing the key binding for "Standart Editor > Show Document Items".

like image 113
e.James Avatar answered Nov 16 '22 16:11

e.James


If you're looking at the symbol in a source file and want to jump to its definition, ⌘-click it.

like image 7
Peter Hosey Avatar answered Nov 16 '22 14:11

Peter Hosey


(command + double click) on your symbol/selector/class in any place of your implementation to jump to them (option + double click) on framework classes/selectors to jump to their reference in help->documentation

like image 2
cocoatoucher Avatar answered Nov 16 '22 14:11

cocoatoucher


One (arguably crude) way to do it seems to be as follows:

This is based on the fact that the Search field at the top right of the Xcode window seems to change behavior depending on what is selected in the Groups & Files sidebar.

  • Select “Project Symbols” in the “Groups & Files” sidebar
  • Press ⌥⌘F (That is Command+Option+F) to jump to the Search field
  • Enter the symbol to jump to, and an outline will quickly show up

(this will remain in effect until you click on something else in the Groups & Files sidebar)

like image 1
Debajit Avatar answered Nov 16 '22 15:11

Debajit