Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to Command-click a symbol into a new tab in Xcode?

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.

like image 620
kraftydevil Avatar asked Mar 28 '13 18:03

kraftydevil


People also ask

How do I open a new tab in Xcode?

You can right-click and pick open in tab. You can also set Xcode, preferences, Navigation, Optional Navigation to Uses Tab. Then when you hold down the option key and click on a file it should open in a new tab, if it's not already open.

How do I switch between tabs in Xcode?

CTRL + TAB - Select Next Tab. CTRL + SHIFT + TAB - Select Previous Tab.


2 Answers

  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.

like image 51
Leigh Avatar answered Sep 20 '22 05:09

Leigh


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)

like image 25
karim Avatar answered Sep 20 '22 05:09

karim