Archive for November, 2009

Xcode – Keyboard shortcuts 101

Thursday, November 5th, 2009

I have had pleasure to work in different programming IDE’s over the years (IDE = Integrated Development Environment). Well to be honest I was lucky to have been able to work in some of the best ones, namely: Visual Studio (6.0 through 2008), Eclipse (and variations such as PyDev, CDT, vXWorks, Carbide.C++, Dev-C++), and of course Xcode.  What I have preached to my junior colleagues, friends, students was to master IDE if they want to be truly productive (regardless of the programming language they use, OS they want to program to, etc). Knowing tips and tricks of IDE will help you solve the problems faster, write better code, and get everything done in time for your favorite football game, series, etc.  So what is a first thing that I recommend to learn about IDE? Can you guess?

Well, first thing that I usually recommend is to learn the keyboard shortcuts. Knowing keyboard shortcuts will increase the speed of typing and automatically increase your productivity. You will still have to use mouse on certain occasions but code development will be done much faster (if code completion is enabled in your IDE increase in speed is even more evident).

My favorite keyboard shortcuts in Xcode are (assuming “Xcode Default” keyboard shortcuts) and the ones I used the most:

Apple + B = Build project

Apple + Return  = Build and Go

Apple + X/C/V = Cut/Copy/Paste

Apple + / = Comment/Uncomment selected text

Option + esc = Completion list

Apple + S = Save

Apple + Z/Y = Undo/Redo

….

This was just a short list of shortcuts I use…. What I would like to hear from other people is what shortcuts they use the most….. So feel free add to this list…

You can always customize keyboard shortcuts Xcode preferences->Key Bindings dialog box. I will not go into detail on this but if you are interested a fairly detailed explanation how to modify keyboard shortcuts is available in the official Apple document called “Xcode Workspace” (available at following address). So if you are interested in setting your own shortcuts go check this document out.