32
votes

I am searching for a keyboard shortcut that allows me to combine 'Cmd-t' (open new tab) and 'Cmd-click on a symbol' (jump to definition). I want to be able to open the symbol definition in a new tab, much like Cmd-click (Ctrl-click on Windows) opens a link in a new tab when using a web browser.

I tried some different combinations but have given up after Cmd-option-Shift-click crashed Xcode!

I'm currently using Xcode 4.6.1.

4

4 Answers

45
votes
  1. Go to XCode->Preferences,
  2. Select Navigation tab,
  3. Change "Double Click Navigation" to "Uses Separate Tab"

Now command-double-click the symbol to open in new tab.

11
votes

The easiest way I found is,

Cmd+T new tab.
Then Cmd+Click on the symbol.

I think Xcode should have, Cmd+Shift+Click to open the function/class in new tab. OR Alt+Cmd+O or something like this :)

UPDATE: It was an old trick. Now you can use @Leigh answer. Cmd + double click + (set preferences to open double click navigation in new tab)

3
votes

Funny you mentioned ⌘⌥⇧-click because you can open the definition in a new tab with that. Unfortunately you also need to click on the right + sign that appears in the window navigator after you do this, so it's somehow a 2 step action. I don't think there's another way to do it. Apple calls it "Jump to Definition In...", since you can choose where to open it. Also, if you're a keyboard person ^⌘⌥⇧J

2
votes

Selecting in the editor, the one step method for this is to ⌥⌘ click. With ⌥⌘, the cursor will change to a pointing finger. Clicking opens that symbol in a new tab.

Selecting in the project navigator, use ⌘ double click.