304
Xcode offers a wide range of keyboard shortcuts to improve your productivity as a developer. Here are some essential Xcode shortcuts for various common tasks:
Navigation:
Cmd + 0: Show or hide the Navigator.Cmd + 1: Show or hide the Project navigator.Cmd + 2: Show or hide the Source code editor.Cmd + 3: Show or hide the Interface Builder.Cmd + 4: Show or hide the Debug area.Cmd + 5: Show or hide the Assistant editor.Cmd + 6: Show or hide the Version editor.Ctrl + 1,Ctrl + 2,Ctrl + 3: Toggle between different editor modes.
Editing:
Cmd + Z: Undo.Cmd + Shift + Z: Redo.Cmd + C: Copy.Cmd + X: Cut.Cmd + V: Paste.Cmd + A: Select all.Cmd + F: Find.Cmd + G: Find next.Cmd + Shift + G: Find previous.
File Operations:
Cmd + N: New file or item.Cmd + O: Open an existing file.Cmd + S: Save the current file.Cmd + Shift + S: Save all files.Cmd + W: Close the current file.Cmd + Shift + W: Close the active workspace or project.Cmd + Q: Quit Xcode.
Code Navigation:
Ctrl + 6: Show the symbol navigator.Cmd + Shift + O: Open quickly to search for files and symbols.Cmd + J: Jump bar, navigate between classes, functions, and methods.Cmd + ]/Cmd + [: Indent or unindent code.Cmd + /: Comment or uncomment the selected code.
Build and Run:
Cmd + B: Build your project.Cmd + R: Run your app.Cmd + .: Stop execution.
Debugging:
Cmd + Y: Activate the Debug area.Cmd + \: Continue execution.Cmd + Option + 0: Show or hide the Debug navigator.Cmd + Option + Y: Show or hide the Debug console.
Version Control:
Cmd + Option + C: Commit changes.Cmd + Option + B: Show or hide the source control navigator.Cmd + Option + M: Merge changes.
Interface Builder:
Cmd + =: Align items.Cmd + ]/Cmd + [: Move forward or backward in the document outline.Cmd + Shift + L: Show or hide the library.
These are just a selection of useful Xcode shortcuts. You can explore more keyboard shortcuts and customize them in Xcode by going to “Xcode” > “Preferences” > “Key Bindings.” This allows you to set up custom shortcuts or modify existing ones to match your workflow.
