Xcode

Xcode keyboard shortcuts.

Build, run, navigate and edit in Apple's IDE. Xcode is macOS-only, so everything uses the ⌘ key.

Build & run
Build⌘+B
Run⌘+R
Stop⌘+.
Clean build folder⌘+⇧+K
Run tests⌘+U
Build & analyze⌘+⇧+B
Profile in Instruments⌘+I
Navigate
Open Quickly⌘+⇧+O
Jump to definition⌃+⌘+J
Jump to line⌘+L
Find in file⌘+F
Find in project⌘+⇧+F
Show file in navigator⌘+⇧+J
Go back⌃+⌘+←
Go forward⌃+⌘+→
Edit
Comment selection⌘+/
Shift right (indent)⌘+]
Shift left⌘+[
Move line up⌥+⌘+[
Move line down⌥+⌘+]
Re-indent / format⌃+I
Show completions⌃+Space
Edit all in scope (rename)⌃+⌘+E
Navigators & panels
Show / hide navigator⌘+0
Show / hide inspectors⌘+⌥+0
Show / hide debug area⌘+⇧+Y
Project navigator⌘+1
Issue navigator⌘+5
Debug navigator⌘+7
Standard editor⌘+↵
Xcode is macOS-only, so every shortcut uses the ⌘ key. The left-hand navigators are reached by number — ⌘ + 1 through ⌘ + 9 — and ⌘ + 0 toggles the whole navigator pane.

The build-run-stop loop

Three keys carry most Xcode sessions: ⌘ + B to build, ⌘ + R to build and run, and ⌘ + . to stop. Add ⌘ + U to run your tests and ⌘ + Shift + K to clean the build folder when something stale needs clearing, and you've covered the daily cycle. Because Xcode rebuilds incrementally, leaning on ⌘ + R rather than the toolbar button keeps you in the editor and in flow.

Move through code and panels

Open Quickly (⌘ + Shift + O) is Xcode's fuzzy file-and-symbol jump — start typing a filename or function and press Return to land there. ⌃ + ⌘ + J jumps to a symbol's definition, and the back/forward pair (⌃ + ⌘ + ←/→) retraces your steps like a browser. The number keys manage the workspace: ⌘ + 0 hides the navigator to reclaim width, while ⌘ + Shift + Y toggles the debug console. These pair naturally with the Mac keyboard shortcuts underneath.

FAQ

What is Open Quickly in Xcode?
Press ⌘ + Shift + O and start typing a file name or symbol; Xcode filters as you type, and Return opens the match. It's the fastest way to move around a project without the navigator.
How do I stop a running app in Xcode?
Press ⌘ + . (Command + period) to stop the current run or build. ⌘ + R runs again.

More cheatsheets