Friday, March 27, 2009

Xcode Single Window Mode

Even though it's on the first pane you see in Xcode's preferences, a lot of people don't realize that Xcode has a couple of different modes it can work in, including an "All-in-One" mode (often referred to as "single-window mode"). The original Project Builder IDE (Xcode's predecessor) used the multiple window paradigm that's familiar to long time Mac and NeXT users. To a large extent, Xcode follows that basic model in its default mode. The debugger, breakpoints, console, and compile error feedback all comes to you by way of different windows.

Now, if you're on a machine with multiple monitors, this really still is the way to go. You can put your breakpoints and console on one monitor and run your program, or the iPhone Simulator on the other, for example, so you can always see your console and breakpoints. You can move the various windows around to best use your available screen real estate.

On the other hand, if you are on a laptop, or some other single-screen setup, especially one with a smaller screen, all those windows can be a little obnoxious. Xcode's single-window mode is ideal for these scenarios.

I've been using Xcode (and before that Project Builder) long enough that I was resistant to the change. But, I'm a laptop guy. I live on my laptop, and only rarely hook up a second display. This is a habit I developed from seven years of non-stop travel. I've gotten quite efficient using just the screen on my 17" MacBook Pro and find that I don't use extra screen real estate in the form of a second monitor effectively when it's available.

Recently, I realized I wasn't as efficient as I should be, though. All those extra windows in Xcode were hard to manage, and I was using exposé constantly because I usually work with Xcode's project windows maximized to take up the full screen. So, I decided to give the all-in-one mode a chance.

I had to revert back to the default mode yesterday to take some screenshots for my current project. In less than a week, I've become not just a fan of the all-in-one mode, I'm addicted to it. I hated turning it off. I hate that I can't use all-in-one mode for writing projects.

I made a few minor changes to make single-window mode work better for me. First, I re-mapped ⌘0 (command-zero, the default project view key binding) to ⌘1 (command one), and re-mapped ⇧⌘R (the debugger window key mapping, which takes you to the other project view in single-window mode) to ⌘2. Doing that, I can easily swap back and forth between the two views with one hand. I can't remember who this tip came from - someone on Twitter - but it's a lifesaver.

I've also tweaked the toolbar a little in single-window mode. Chances are I will be tweaking more as I get more accustomed to this layout, but this is my current layout:

If you work on a single-display, it's probably worth your time to give all-in-one mode a spin for a few days.

No comments:

Post a Comment