Turn "browser mode" off in Xcode? 🙏🏼

Is there any way to force Xcode to open a document vs a browser? Documents stay married to their Window for the life of the Window, no exceptions vs the opposite with a Browser. I am continuously battling Xcode to keep my workspace context. I need to have documents remain open and not shift between files that they display.


For example, I have 8 windows open in Xcode. I flip to my project in the finder, open a "document" (aka AppSingleton.m) and Xcode changes one of my "windows" to show this "document" as if I am browsing. It tends to be the window showing the code that made me want to see the other document. Like going to the library and only being permitted to have one book open to one page a time... and when you attempt to open another, the librarian sweeps by and takes the other book and page away. Completely exasperating.


Another example, I have a window open and editing a storyboard. I want that window to act like a document and to stay editing the story board and nothing to change that. Pressing "Command R" accidentally with that "browser" in front will toss that window into browsing the debugger and now my story board editing context is gone. In a real way, Xcode loses data... the context of my workflow and workspace.


It is like having wind **** across my desk and scatter my papers. I know Xcode is designed to be a one window system like iTunes but my "desk" is big and one sheet of "paper" stretched across it doesn't work. I have two Apple 27" displays with a retina 15" inbetween. Pretty much a waste with Xcode's "iTunes" one-window-world. It's a continious fight.


Is there any hidden setting to make Xcode not do the "browser thing" and have Windows act like documents? I need it to act like Numbers, Pages, Excel, etc. In a nut shell, I open a document and that document gets a window and they stay married for the life of the window, no exceptions.


Even the Finder can do it for a folder (command option T) and take that infernal "browser" mode off.


Help!


Replies

For me at least, this only happens when you open a file that's already in the workspace you're working on. For files outside the workspace, it shows up in a separate window. Here's a trick you might want to use:

  1. Instead of opening the file in the Finder, use Open Quickly (⇧⌘O) or one of the navigators.
  2. Hold the Option key to force the new file into the active Assistant Editor or activate it if it's inactive.
  3. Or, hold Option and Shift to choose exactly where the file will be shown. You have tremendous flexibility in getting this done.

I have been trying that and a number of other things and yes, with what amounts to playing chords in Xcode I can get the windows to start out in a good place. The problem is that the workspace is volitile.


Xcode invariably starts switching it's window contents around as it treats every window as a browser. I frequently end up with something like 3 windows showing the same .h files and then manually having to go back and reset them the the Xcode browser back button. If you think about it, having 3 or 5 or 100 windows showing the same file is pretty useless and sounds like a bug for any kind of document editing.


It dawned on me while answering some email that Apple Mail is very similar to Xcode with one huge exception, browser windows and document windows are completely different. Browser windows change their context/contents based upon the scrolling list of "documents" to the side. Double clicking one of those left hand documents brings up real document window.


Given the similarity of the enviroments, I would consider it a bug in Xcode that separately opened files don't act like documents if I were new to Xcode. (am part of the old guard, returning or trying to...)