8 Power Xcode shortcuts every developer should know 💪

Xcode tips to boost your productivity

Photo by Burst on Unsplash

1. This is one i swear i can’t live without. For commenting out multiple lines of code use cmd + /

cmd + / to add comment blocks

2. Use cmd + shift + O to quickly search through and open any file. You can also use the same keys to navigate to any method in your code base. As a pro-tip, make sure you have the toggle swift generated interface turned on. You can click on the swift bird icon or use cmd + G after the open quickly search bar appears. This allows you to search through swift generated interfaces of any Objective-C headers in your project.

cmd + shift + O to to pen quickly

3. use cmd + 1,2,3,4… to easily switch between the project navigators in Xcode. Also, as a side note, cmd + 1 on the simulator is a shortcut to automatically shrink the current device to match its actual physical size. While cmd + 2 will resize it to be pixel accurate.

cmd + 1,2,3,4 to quickly switch between panels

4. Given how much time you will be spending in the simulator, if you ever wanted to bring up the keyboard in your app, cmd + K will do the trick.

cmd + k will bring up the keyboard 😃

5. A quick and easy way to see the scope of your functions and braces is by using cmd + mouse hover over the braces.

6. Often, while doing presentations, I find this tip can be very helpful. Easily fold the scope by one level. cmd + alt + left arrow key will fold, while the right arrow key will unfold. Optionally, you can simply click the folded area to automatically open it.

folding and unfolding! Easy!

7. Another tip i can’t simply live without is the cmd + click to see the definition. This is great for when you have a large code base and you don’t really know where certain definitions of the functions live. I also find it essentially useful when i need to quickly navigate to the apple internal classes, check out the documentation and browse other methods available inside the classes.


8. Often times you find yourself navigating between multiple files in your codebase, and simply wish to go back to the previous file. Using cmd + ctrl + leftor right arrow keys will allow you to navigate between the previous and next files that you accessed. Pretty handy me thinks.

cmd + ctrl + leftor right arrow keys

I hope these tips helped you out and you learned something new today, if you enjoyed reading this article be sure to throw me a couple of claps. Feel free to stalk me on instagram and twitter 😃

Like what you read? Give Michael Dube a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.