[CS] Xcode

(cheat sheets) 2020/04/26 by jean tran

I wanted to share some of Xcode common shortcuts, that could be time-saver especially while main tasks is coding.

Cmd + F                     Find in File
Cmd + Option + F            Find & Replace in File
Cmd + Shift + F             Find in Project
Cmd + Option + Shift + F    Find & Replace in Project

Editing

Cmd + Option + ENTER        Show Assitant Editor
Cmd + ENTER                 Hide Assitant Editor
Ctrl + SPACE or ESC         Toggle Completions
Cmd + ]                     Indent Section
Cmd + [                     Outdent Section
Ctrl + i                    Fix Indentation
Cmd + /                     Comment / Uncomment
Cmd + Option + [            Move Line Up
Cmd + Option + ]            Move Line Down

Tabs

Cmd + T                     New Tab
Cmd + }                     Previous Tab
Cmd + {                     Next Tab
Cmd + Shift + O             Quick Open
Cmd + J                     Focus to Editor
Cmd + Ctrl + UP             Next Counterpart
Cmd + Ctrl + DOWN           Previous Counterpart
Cmd + Ctrl + RIGHT          Next Recent File
Cmd + Ctrl + LEFT           Previous Recent File
Cmd + click                 Defination of Symbol
Cmd + L                     Go to Line
Cmd + Option + LEFT         Fold Section
Cmd + Option + RIGHT        Unfold Section
Cmd + 0                     Show /Hide 
Cmd + 1-8                   Switch tabs 
Option + click              Open Assistant Editor
Shift + Option + click      Decide where to Open
double click                Open in New Window

Utilities (right side panel)

Cmd + Option + 0            Show / Hide
Cmd + Option + 1-9          Go to Tab

Debugging

Cmd + Shift + Y             Toggle Debug Area
Cmd + '                     Next Issue
Cmd + "                     Previous Issue
Cmd + \                     Add / Remove Breakpoint
Cmd + Y                     Active / Deactive Breakpoints
Cmd + K                     Clear Console

Debugging & Run

Cmd + B                     Build
Cmd + R                     Run 
Cmd + .                     Stop
Cmd + Shift + B             Analyze
Cmd + U                     Test 
Cmd + Shift + K             Clean
Cmd + opt + Shift + K       Deep Clean

References

WEBSITE: https://developer.apple.com/xcode/

DOCUMENTATION: https://developer.apple.com/documentation/xcodekit

Last updated

Was this helpful?