Xcode Keyboard Shortcuts

The shortcuts senior iOS engineers actually use. Memorize the starred ones; the rest are nice to know.

ShortcutActionNotes
⌘⇧O★ Open Quickly (any file by fuzzy name)The single most-used shortcut. Type LoginV to jump to LoginViewController.swift.
⌃⌘↑Switch between .h / .m or counterpart fileLess useful in Swift but works
⌃6★ Jump to symbol in current fileMethod picker dropdown
⌃⌘JJump to definitionSame as + click
⌃⌘← / Navigate back / forward (like browser history)Essential for navigation-heavy work
⌘LJump to line number
⌘1⌘9Switch navigator tabs (Project, Find, etc.)
⌘0Hide/show navigator (left sidebar)
⌘⌥0Hide/show inspector (right sidebar)
⌘⇧YHide/show debug area (bottom)

Find & replace

ShortcutAction
⌘FFind in current file
⌘⇧F★ Find in workspace
⌘⌥FFind & replace in current file
⌘⌥⇧FFind & replace in workspace
⌘EUse selection for find
⌘G / ⌘⇧GFind next / previous

Build, run, test

ShortcutAction
⌘BBuild
⌘R★ Run
⌘.★ Stop
⌘URun all tests
⌃⌘UBuild for testing (no run)
⌃⌥⌘URun currently-edited test
⌘⇧KClean build folder

Editor

ShortcutAction
⌃IRe-indent current line(s)
⌘/★ Toggle line comment
⌥⌘[ / ]Move line up / down
⌃KDelete to end of line
⌘DDuplicate line(s) (in some Xcode versions; otherwise via Editor menu)
⌘⇧A★ Show code actions (refactor, fix, generate)
+ clickReveal documentation for symbol
⌥⌘← / Fold / unfold code block

Multiple cursors / selection

ShortcutAction
⌃⇧↑ / Add cursor above / below
⌘⌥EInsert next occurrence as cursor
⌘⇧LSelect all occurrences of current symbol

Refactoring

ShortcutAction
⌘⇧A then RenameRename symbol across project (uses LSP, safe)
⌘⇧A then Extract to FunctionPull selection into method

Debugging

ShortcutAction
⌘\Toggle breakpoint at current line
⌘YActivate / deactivate all breakpoints
F6Step over
F7Step into
F8Step out
⌃⌘YContinue
⌘KClear console

Documentation & quick help

ShortcutAction
+ click symbolQuick Help popover
⌘⇧0Developer Documentation window
⌃⌘?Quick Help inspector

Source control

ShortcutAction
⌘2Source Control navigator
⌥⌘CCommit (opens commit sheet)

Window / layout

ShortcutAction
⌘⌥⏎★ Open Assistant Editor (split view, e.g. show counterpart or preview)
⌘⇧↩Close all editor splits except focused
⌘\\`Move focus between editor splits
⌃⌘FFull-screen toggle

The 10 shortcuts to memorize first

If you only memorize ten, make them these:

  1. ⌘⇧O — Open Quickly (jump to any file)
  2. ⌘⇧F — Find in workspace
  3. ⌘B / ⌘R / ⌘. — Build, Run, Stop
  4. ⌃6 — Jump to symbol in file
  5. ⌘0 — Hide navigator (more screen)
  6. ⌘/ — Toggle comment
  7. ⌘\\ — Toggle breakpoint
  8. ⌘⇧A — Code actions
  9. ⌘U — Run tests
  10. ⌘⇧K — Clean build folder

SwiftUI Preview shortcuts

ShortcutAction
⌘⌥PResume preview
⌘⌥⏎Show preview
⌘⌥⇧↩Refresh preview (when stuck)

Bonus — terminal-feeling editing

Xcode supports many emacs-style key bindings in its editor:

ShortcutAction
⌃AMove to start of line
⌃EMove to end of line
⌃F / ⌃BForward / back one char
⌃P / ⌃NPrevious / next line
⌃DDelete forward
⌃KKill to end of line
⌃YYank (paste killed text)

If you came from a terminal-heavy background, these reduce hand travel substantially.


Stick the 10-shortcut list on a sticky note next to your monitor for a week. After that, your hands know them.