What Xcode keyboard shortcuts do you use regularly?

XcodeKeyboard Shortcuts

Xcode Problem Overview


What Xcode keyboard shortcuts do you use regularly?

I am a huge believer in using the keyboard as much as possible (its much faster that way), and I was hoping others could share some of the Xcode shortcuts they use.

Xcode Solutions


Solution 1 - Xcode

I find the shortcuts to open & close various areas of the screen must useful.

shortcuts

Solution 2 - Xcode

Cmd + Shift + o opens the "Open quickly" dialog, where you can quickly find and open files that contain the text you enter.

Solution 3 - Xcode

Updated for newer versions:

Control + Command +

Switches between corresponding .h / .m files or as Apple's own documentation, it means Jump to Counterpart

Solution 4 - Xcode

command + shift + j

Reveals the current file in the project navigator. Very useful if you use command + control + J to jump to a definition as Xcode won't automatically reveal the containing file in the navigator.

Solution 5 - Xcode

command /

Comment out the current line, or multiple lines if they're highlighted.

Comes in handy for quick commenting and uncommenting while experimenting with code.

Solution 6 - Xcode

Re-indent. It's in Edit > Format > Re-Indent and there's no shortcut by default (I use Command + Shift + L). It's a godsend.

Solution 7 - Xcode

command F Search in the File

option command F Search & Replace in the File

shift command F Search in the whole project

shift option command F Search & Replace in the whole project

Notice the pattern for easy memorizing.

Solution 8 - Xcode

Ctrl + Command + - Switch between header and implementation files.

Solution 9 - Xcode

Command + J (Move focus to any section of the editor)

Solution 10 - Xcode

Control + Command + j

Highlight a keyword (method name) and jump to its definition. Also works for variables, #defines, etc.

Solution 11 - Xcode

Some of my favorite shortcuts are not keyboard shortcuts at all, but multitouch gestures. All Macbooks from early 2008 onward, and I would imagine desktops with a Magic Mouse or Magic Trackpad, support three-finger-swipe up and down to switch between the header and implementation, and three-finger-swipe left and right to navigate within the file history.

Solution 12 - Xcode

Command + Shift + Y for the console.

Solution 13 - Xcode

I find a cheat sheet next to the computer is the best way to pick up useful shortcuts. Cocoa Samurai has a good one.

Solution 14 - Xcode

Key Bindings to XCode Actions

Create your own keyboard shortcuts using the Text Key Bindings tab of the Key Bindings preference pane. A time-saver all its own. Just lookup your favourite actions and add/edit shortcuts!

Another thread you may find useful is here.

Solution 15 - Xcode

Just the basic emacs navigation. Feels so right.

Solution 16 - Xcode

I cannot live without three finger vertical swipe to switch between interface and implementation file. If you miss that in xcode-4/Lion, make sure to follow the following instructions:

http://geeksinkilts.com/?p=67

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionUmairView Question on Stackoverflow
Solution 1 - XcodeRobertView Answer on Stackoverflow
Solution 2 - XcodeLudvig A. NorinView Answer on Stackoverflow
Solution 3 - XcodeDarrenView Answer on Stackoverflow
Solution 4 - XcodeAndyView Answer on Stackoverflow
Solution 5 - XcodeSanjay ChaudhryView Answer on Stackoverflow
Solution 6 - XcodejbrennanView Answer on Stackoverflow
Solution 7 - XcodeSanjay ChaudhryView Answer on Stackoverflow
Solution 8 - XcodeBlackTigerXView Answer on Stackoverflow
Solution 9 - XcodeJianView Answer on Stackoverflow
Solution 10 - XcodeSanjay ChaudhryView Answer on Stackoverflow
Solution 11 - XcodeJeffrey WearView Answer on Stackoverflow
Solution 12 - XcodeFabiano FrancesconiView Answer on Stackoverflow
Solution 13 - XcodeJonathan MoffattView Answer on Stackoverflow
Solution 14 - XcodeOld McStopherView Answer on Stackoverflow
Solution 15 - XcodetommyoView Answer on Stackoverflow
Solution 16 - XcodeSanjay ChaudhryView Answer on Stackoverflow