My Most Used/Useful Keyboard Shortcuts for Xcode πŸ’»

I love using keyboard shortcuts on my Macbook! I especially love using shortcuts in Xcode because it really helps my productivity. When using keyboard shortcuts I sometimes feel like I have magic powers being able to move around Xcode with ease. Below is a list of my most commonly used shortcuts.

For reference here are the Mac symbols used for these shortcuts.

Keyboard Cheat Sheet:
⌘ – Command
⇧ – Shift
βŒ₯ – Option/Alt
βŒƒ – Control
β‡ β‡’ – Left/Right Arrow Keys
⇑⇣ – Up/Down Arrow Keys
⏎ – Return
β‡₯ – Tab
βŽ‹ – Escape

I recommend opening up a Xcode project and trying these out to see how each one works!

⌘ + R – Used for running your code

⌘ + N – Create a new file

⌘ + ⇧ + N – Create a new project

⌘ + βŒ₯ + 0 – Show and hide Inspector

⌘ + ⇧ + Y – Show and hide debugger console

⌘ + 0 – Show and hide Navigator

⌘ + F – Search a file for a particular thing

⌘ + ⇧ + F – Search the whole project for anything

⇧ + ⌘ + O – To open a file quickly (Great way to navigate if you know what file you are looking for)

⌘ + ⇧ + K – Cleans the folder your working in from its warnings and errors. This is useful when you’re pretty sure the code you wrote is correct, but when you run it, something is broken

⌘ + ⇧ +βŒ₯ + K – Clean All files and build folder

βŒƒ + I – This will align your code and make whatever code you have highlighted look nice and clean

⌘ +βŒ₯ + ⏎ – If you are using SwiftUI this will toggle your preview canvas

⌘ + / – Comment and uncomment code

⌘ + \ – Add a breakpoint to the current line of code

⌘ + Y – Enable or disable all breakpoints (I use this all the time when debugging code)

⌘ + . – Stop the current code that’s running

⌘ + L – Jump to a particular line in that files code

⌘ + ⇧ + L – Brings up the Library

For a more complete list of keyboard shortcuts check our Apples documentation.

I hope this helps make you a wizard of Xcode πŸ§™β€β™‚οΈ! Happy programming!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s