51

Every time I double click a file it opens it in a new window. (If I single click then it shows it in the main window). I just want it to open the thing in the main window, regardless of if I double click or single click it. Kind of like how visual studio or eclipse work.

Same thing when I try to find text in a file (command-shift-f), in the results, if i double click them it'll open the file in a new window...

All these new windows are annoying, any way to make it so it doesn't create new windows and just displays the code in the main window at all times?

Shai UI
  • 50,568
  • 73
  • 204
  • 309
  • OK, other than the obvious --don't double click-- it is probably important to note that opening a file in a new window is really useful. It becomes more relevant and useful if you have two or three monitors on your system. In my opinion engineering workstations must have a minimum of two monitors, with three being ideal. Given this it is very common to open a file in a new window and drag it into another monitor. The technique is very effective and most definitely provides an important productivity boost. – martin's May 19 '11 at 05:17
  • 1
    The single biggest problem of this design is that now Xcode has to wait for the double-click delay before it can respond to each and every single-click on a file. This has the effect of making the entire interface seem slower and clunkier than it needs to be and is completely artificially imposed. Thankfully, Xcode is smart enough to remove this delay if you set double-click to "Same as Click" as per Siem's answer. I highly recommend changing this setting if you don't use the double-click "feature". – devios1 Feb 27 '17 at 15:35

2 Answers2

66

Go to your Preferences window and change the value of

  • Double Click Navigation to Same as Click

(Note: In newer versions of Xcode this is found in the Navigation tab.)

enter image description here

devios1
  • 36,899
  • 45
  • 162
  • 260
Siem Abera
  • 824
  • 8
  • 9
  • 21
    In Xcode 5, this preference was moved to **Preferences > Navigation**, rather than Preferences > General. – Troy Jan 16 '14 at 19:11
  • 10
    THANK YOU! Holy smokes this was annoying. – Maury Markowitz Apr 14 '14 at 20:05
  • 2
    There is actually another subtle but HUGE advantage to doing this: by setting double click to "Same as Click", you no longer have to wait for the double-click delay before a single click will open your file. It may not seem like a big deal, but those milliseconds add up and it will make Xcode feel a lot snappier. – devios1 Feb 27 '17 at 15:27
  • Thanks for this, I set Double Click Navigation to "Uses Separate Tab" and life's awesome now. – Kevin Mar 23 '17 at 17:05
8

In Xcode 8, you can change this setting by going to Preferences, Navigation, and changing "Double Click Navigation" to "Same as Click".

SCreenshot

Flimm
  • 136,138
  • 45
  • 251
  • 267