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?
1 Answer
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.
-
2If 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?– wshaheerCommented Jul 30, 2018 at 23:52
-
1If 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.– heximalCommented Jun 18, 2021 at 18:14