7

In Xcode editor, is there a way to open files in a new tab only if one is not already present, and if it is, then switch to that tab. If it isn't possible to do so via the preference settings, can it be done via script?

2
  • What version of OS X/macOS and Xcode are you running? Commented Dec 20, 2017 at 4:56
  • Xcode version 9.2, macOS version 10.13.2
    – wshaheer
    Commented Dec 20, 2017 at 5:04

1 Answer 1

1

There is no way in Xcode (both natively or via any preference) to switch to the tab with the file already open (when attempting to open a file from another tab/window).

This seems appropriate, as many a times a file may be required to be open in multiple tabs/windows. Also, alongside the assistant editor feature of Xcode, having such a feature may not be practical/desirable.

3
  • 2
    If you look at other popular editors such as Atom or VSCode, they all follow the design of having a single tab open for each file. And when trying to open it again, it simply switches to that tab. For future releases, perhaps this could be added in as an option?
    – wshaheer
    Commented Jul 30, 2018 at 23:52
  • 1
    If you feel such a functionality should be a part of Xcode, there’s always an option to give feedback to Apple by filing a Radar. Just visit bugreport.apple.com
    – Nimesh Neema
    Commented Jul 31, 2018 at 8:51
  • Still no solution? I hate this behavior. Why doesn't Apple make this option in prefereces.
    – heximal
    Commented Jun 18, 2021 at 18:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .