Xcode HotKeys
Xcode is a powerful integrated development environment (IDE) launched by Apple, specially designed for macOS and used to develop iOS, macOS, watchOS and tvOS applications. It integrates code editors, debuggers, interface building tools and performance analysis tools to provide developers with a one-stop development experience.
During the development process, using shortcut keys can help developers quickly complete common tasks, such as editing code, navigating projects, running debuggers, etc., which not only saves time, but also improves development efficiency. Whether you are a novice or an experienced developer, mastering Xcode shortcuts can significantly improve the smoothness of your workflow.
Xcode MacOS shortcut keys
Editor menu
Shortcut keys | Function description |
---|---|
⌥ + ⌘ + I |
Outline |
Function 6 |
Step |
⌃ + ⇧ + ⌘ + ← |
Collapse comment block |
⌘ + \ |
Add a breakpoint on the current line |
⌃ + ⇧ + ⌘ + → Arrow |
Expand comment block |
⌘ + R |
Run |
⌘ + + |
Enlarge text |
⌥ + ⇧ + ⌘ + → Arrow |
Expand methods and functions |
⌘ + / |
Comment selection |
⌘ |
Reduce text |
⌃ + ⌘ + B |
Analysis |
⌥ + ⇧ + ⌘ + K |
Clean build folder... |
⌘ + I |
Outline |
⌥ + ⌘ + ↑ |
Previous Page |
⇧ + ⌘ + I |
Built for analysis |
⌘ + | |
Add vertical guides |
⌘ + [ |
Left edge alignment |
⇧ + ⌘ + K |
clean |
⌘ + Y |
Activate breakpoint, deactivate breakpoint |
⌘ + = |
Fit to size |
⌘ + Less Than |
Editing scheme… |
⌥ + ⌘ + [ |
Move up the queue |
⌘ + _ |
Add horizontal guides |
⌃ + ⌘ + I |
No building outline |
⌃ + ⇧ + Function 6 |
Across threads |
⌃ + ⌘ + R |
No need to build to run |
⌃ + ⌥ + ⌘ + B |
Analysis |
⌃ + ⌘ + M |
Show all questions |
⌘ + . |
Stop |
⌘ + ] |
Shift right |
⌃ + ⌘ + Function 7 |
Step into teaching |
⌃ + ⌘ + R |
Add relationship |
Function 8 |
Go out |
⌃ + ⌘ + U |
Test without building |
⌥ + ⌘ + ↓ |
Next page |
⌘ + [ |
Shift left |
⌥ + ⌘ + R |
Run |
⌃ + ⌘ + A |
Add attribute |
⌃ + \ |
Show completion status |
⌥ + ⌘ + T |
Test |
⇧ + ⌘ + U |
Built for testing |
⇧ + ⌘ + R |
Born to run |
⌥ + ⇧ + ⌘ + O |
Overwrite mode |
⌃ + ⌘ + Y |
Pause |
⌥ + ⇧ + ⌘ + ← |
Folding methods and functions |
⌘ + T |
Test |
⌃ + ⌘ + F |
Fix all problems in scope |
⌥ + ⌘ + ] |
Move down one line |
⌃ + Function 6 |
Step command |
⌃ + ⇧ + Function 7 |
Enter thread |
⌘ + K |
Clear console |
⌘ + B |
Build |
Function 7 |
Step into |
⌥ + ⌘ + ← |
Fold |
⌥ + ⌘ + → Arrow |
Expand |
⌃ + ⌘ + E |
All content within the editing range |
⌘ + ] |
Right edge alignment |
File menu
Shortcut keys | Function description |
---|---|
⇧ + ⌘ + S |
Save as... |
⌃ + ⌘ + W |
Close document |
⌘ + T |
New tab |
⌥ + ⌘ + S |
Save all |
⇧ + ⌘ + N |
New item… |
⌥ + ⌘ + W |
Close all windows |
⌥ + ⇧ + ⌘ + S |
Save multiple... |
⌘ + N |
New file… |
⌃ + ⌥ + ⌘ + X |
Update all |
⇧ + ⌘ + O |
Quickly open... |
⌥ + ⇧ + ⌘ + W |
Close other tabs |
⌘ + S |
Save |
⌥ + ⌘ + X |
Update… |
⇧ + ⌘ + W |
Close tag |
⌃ + ⌘ + S |
Create snapshot... |
⌥ + ⌘ + A |
Add file... |
⇧ + ⌘ + P |
Page setup… |
⌘ + O |
Open… |
⌃ + ⌘ + N |
New workspace |
⌘ + W |
Close window |
⇧ + ⌘ + T |
New Windows |
⌥ + ⌘ + N |
New Group |
⌥ + ⌘ + C |
Crime… |
⌘ + P |
Print… |
View menu
Shortcut keys | Function description |
---|---|
⌃ + 2 |
Show previous history |
⌃ + 5 |
Show group files |
⌃ + 4 |
Show top-level items |
⌃ + ⇧ + ⌘ + W |
Remove assistant editor |
⌘ + ⏎ |
Standard |
⌥ + ⇧ + ⌘ + Z |
Reset editor |
⌘ + 4 |
Question |
⌃ + 7 |
Display problem |
⇧ + ⌘ + Y |
Show debugging area |
⌥ + ⌘ + ⏎ |
Assistant |
⌃ + 1 |
Show related products |
⌃ + ⌘ + 2 |
Show previous file history |
⌃ + 6 |
Show document items |
⌘ + 3 |
Search |
⌘ + 7 |
Log |
⌘ + 6 |
Breakpoint |
⌘ + 2 |
Symbol |
⌘ + 1 |
Project |
⌃ + 3 |
Show next history record |
⌘ + 0 |
Show navigator |
⌃ + ⌘ + 3 |
Show next file history |
⌘ + 5 |
Debugging |
⌥ + ⇧ + ⌘ + ⏎ |
Version |
Navigation menu
Shortcut keys | Function description |
---|---|
⌃ + ⌘ + → Arrow |
Forward |
⌃ + ? |
Jump to previous placeholder |
⌘ + < |
Open in adjacent editor |
⌃ + ⌘ + ↑ |
Jump to corresponding party |
⌃ + ⌥ + ⌘ + ← |
Return in alternate editor |
⌘ + J |
Jump to selection |
⇧ + ⌘ + D |
Jump to definition |
⇧ + ⌘ + J |
Skip to... |
⌥ + ⇧ + ⌘ + K |
Move focus to the previous area |
⌥ + ⌘ + K |
Move focus to next area |
⌃ + ⌘ + ← |
Go back |
⌘ + '' |
Skip to next issue |
⌘ + " |
Jump to the previous issue |
⌃ + / |
Jump to next placeholder |
⌘ + L |
Show in project navigator |
⌃ + ⌥ + ⌘ + → Arrow |
Forward in alternate editor |
⌃ + ⌘ + `'' |
Jump to next problem and fix it |
⌃ + ⌘ + " |
Jump to and fix the previous problem |
Edit menu
Shortcut keys | Function description |
---|---|
⇧ + ⌘ + E |
Replace using selection |
⌥ + ⇧ + ⌘ + V |
Paste and match styles |
⌘ + A |
Select all |
⇧ + ⌘ + Z |
Redo |
⌃ + ⇧ + ⌘ + T |
Display font |
⌘ + Z |
Undo |
⌘ + G |
Find the next one |
⌥ + ⌘ + V |
Paste Special |
⌘ + C |
Copy |
⌥ + ⇧ + ⌘ + F |
Find and replace in the workspace... |
⌘ + E |
Find using selection |
⌥ + ⌘ + F |
Find and Replace… |
⇧ + ⌘ + F |
Find in workspace... |
⇧ + ⌘ + G |
Find the previous one |
⌘ + X |
Cut |
⌥ + ⌘ + L |
Filter in library |
⌘ + D |
Copy |
⌘ + F |
Find... |
⌘ + : |
Show spelling and grammar |
⌥ + ⌘ + J |
Filters in the Navigator |
⌘ + V |
Paste |
Help menu
Shortcut keys | Function description |
---|---|
⌃ + ⌥ + ⌘ + / |
Search documents for selected text |
⌃ + ⌘ + ? |
Quick help |
⌥ + ⌘ + ? |
Developer Documentation |
Window menu
Shortcut keys | Function description |
---|---|
⌘ + M |
Minimize |
⇧ + ⌘ + 2 |
Organizer |
⌘ + { |
Select previous tab |
⇧ + ⌘ + 1 |
Welcome to Xcode |
⌘ + } |
Select next label |
Xcode Menu
Shortcut keys | Function description |
---|---|
⌘ + , |
Priority... |
⌥ + ⌘ + H |
Hide others |
⌘ + H |
Hide Xcode |
⌘ + Q |
Exit Xcode |
Xcode official website information
If you want to get the latest Xcode version or learn related content, you can visit the following links:
-
Official website address: https://developer.apple.com/xcode/
-
Download address: Mac App Store Xcode
-
Shortcut address: Xcode shortcut official document
Apple's official website provides a wealth of documentation resources and tutorials to help developers understand the use of Xcode more deeply.
Xcode shortcut key FAQ
The following lists the common questions and answers about Xcode shortcut keys:
-
How to customize Xcode shortcut keys?
SelectPreferences > Key Bindings
in the Xcode menu to view and edit shortcut key configurations. -
How do I reset the shortcut settings?
After entering theKey Bindings
page, click theRestore Defaults
button to restore the shortcuts to the default settings. -
What programming languages does Xcode support?
Supports Swift, Objective-C, C, C++, and other LLVM-based languages. -
How do I solve the problem of invalid shortcuts?
Check whether there is a conflict with the macOS system shortcuts and adjust them inSystem Preferences > Keyboard
. -
How do I quickly locate files using shortcuts?
UseCmd
+Shift
+O
to open the symbol quick search window to quickly find files and classes. -
What should I do if the debugging shortcuts do not work?
Make sure the project has been built correctly and is in debug mode, and check whether the shortcuts are disabled. -
How do I share custom shortcut configurations?
Export thePreferences
configuration file and share it with other developers. -
What should I do if the shortcut keys of the new version of Xcode have changed?
Check the official documentation to get the shortcut key list of the new version, and adjust your work habits in time.
Summary
Xcode is the core tool for Apple developers. Its shortcut key functions cover file management, code editing, navigation, running and debugging, etc. By using these shortcut keys reasonably, you can significantly improve development efficiency and reduce the time wasted on manual operations. It is recommended that developers gradually develop the habit of shortcut key operation in daily use and become masters of efficient development in Xcode.
Discussion
New Comments
No comments yet. Be the first one!