XCode Tip: Tools Navigation
The mouse is a fantastic tool to work and explore what an application can do for us, but as long as we are coders, most of our time we have our hands on the keyboard. Moving to get the mouse to change context and back to the keyboard is something that we can avoid in a lot of situations.
I love the keyboard, and I usually spend some time improving my knowledge about the shortcuts on the tools I use, in order to be able to work faster. I did this exercise with XCode some time ago and here I expose some of the shortcuts I use the most.
The XCode Editor is a big topic so I will cover it in another post, here I’ll focus on the navigability among some of the tools offered by XCode.
Configuration
I have configured XCode to have editor and debugger in the same window frame, this can be done on the General tab on the XCode preferences pane.

On setting this option, a selector will appear on the top left to select between the debugger window and the project/edit view.
![]()
To the debugger and back
On build and go (⌘ + ⏎) the debugger will be opened hiding the debugger editor. Once you are done with it you can go back to the project using ⌘ + 0. This shortcut will open the project/editor and the editor will get the focus, so you can edit right away.
The same ⌘ + 0 will take you to the project pane so you can select a file using the arrows. Here, if the file you want to open is visible (not disclose) you can also type directly the name of the file to open it. I miss here some of the Textmate powerful features to open resources. Three tabs (⇥) here will take you to the editor again.
Once on the editor, it may happen that the window is split in two. At the top you have a window for the build and find results (and others). At the bottom you have the code editor. Using ⇧ + ⌘ + E you make the editor using as much space as possible. If you hit it again you will go back to the previous state.
In any moment on the project/editor window you can use ⇧ + ⌘ + Y to go back to the debugger. In the debugger ⇧ + ⌘ + R will set the focus on the Console so you can type commands.
So, as can be seen, with for shortcuts you can move to the debugger and back and also go to the console and the editor. Only this, saves me lots of mouse.
Files on the editor
On the editor you need to move around the different files. A typical action is open the counter part (h or m) file. You can do this using ⌘ + ⌥ + ↑.
At the top of the editor window you have to small combo menus. One for the opened files and another for the symbols on the currently edited file.

You can open these with the keyboard using ⌃ + 1 and ⌃ + 2. These two shortcuts may collide with your spaces configuration so I have changed the shortcut to ⌃ + ⌥ + 1 and ⌃ + ⌥ + 2.
Finally, think that you can also go to preferences and change the shortcuts to something more suitable to you.



