Top 10 Most Useful Xcode Shortcuts for Navigation

Use them to boost your daily productivity.

Lee Kah Seng
Jan 6 Β· 5 min read

When doing development using Xcode, the most common actions performed by developers are updating code, switching tabs, changing source editors and opening files. Therefore, able to perform all these navigation within Xcode with a simple editor or storyboard shortcut will definitely give your productivity a significant boost.

In this article, let’s look at the top 10 most useful Xcode shortcuts for navigation that every developer should know.

Knowing the Mac Keyboard Symbols

Sometimes the Mac keyboard symbols are a bit confusing. The following diagram should be able to clear things up for anyone who has difficulties in recognizing the Mac keyboard symbols.

Mac keyboard symbols

With all that said, let’s get started.

Show / Hide Minimap πŸ‘‰ βŒƒβ‡§βŒ˜M

control + shift + command + M

Minimap is one of the most anticipated features introduced in Xcode 11. It is a bird’s eye view of your code and it is meant for navigation.

By using minimap, you can easily and accurately navigate to any parts of your source code. Therefore, able to show/hide the minimap easily can definitely improve your productivity.

Shortcut to show/hide minimap

Show Library πŸ‘‰ β‡§βŒ˜L

shift + command + L

When used in the source editor, this shortcut will show a library of code snippets, image assets, and color assets. On the other hand, when used in storyboard, it will show a library of UI objects, image assets, and color assets.

I mostly use this shortcut in storyboard to quickly bring up the UI objects library and add the desired UI object into storyboard.

Shortcut to show library

Show Document Items πŸ‘‰ βŒƒ6

control + 6

This shortcut is especially powerful when you want to navigate through a long source code.

What you can do is to use this shortcut to bring up a list of document items, start typing to filter the list, then select your desired document item to jump to the respective source code location.

Shortcut to show document items

Quick Open πŸ‘‰ β‡§βŒ˜O

shift + command + O

This is my favorite and most used shortcut of all time.

This shortcut will bring up the Open Quickly text box. You can use the text box to search by filename, method name, class name, etc. Just hit ↩ on the desired result to open its respective file on the current active editor.

Pro tip: Use βŒ₯↩ to open the Open Quickly text box result in another new editor.

Shortcut to show Open Quickly text box

Highlight File in Project Navigator πŸ‘‰ β‡§βŒ˜J

shift + command + J

I usually use this shortcut alongside with the quick open shortcut (β‡§βŒ˜O).

The trick is to use the quick open shortcut to search for the desired file, open it in the editor, after that hit β‡§βŒ˜J to quickly highlight the file in the project navigator. Note that this shortcut also works on the secondary source editor.

Shortcut to highlight file in the project navigator

Go to Line πŸ‘‰ ⌘L

command + L

During a code review session, your fellow colleagues might need you to improve or rework on a specific line of code. In this kind of situation, this shortcut can help you quickly navigate to the exact line of code that you need to rework.

Shortcut to show line number text box

Switching Tabs πŸ‘‰ β‡§βŒ˜}

shift + command + }

Tab is one of the most commonly used features in Xcode. Using this shortcut allows you to switch tabs from left to right.

Pro tip: Use β‡§βŒ˜{ to switch tabs from right to left.

Shortcut to switch between tabs

Show / Hide Preview πŸ‘‰ βŒ₯βŒ˜β†©

option + command + enter

I found this shortcut extremely useful when working on a SwiftUI file. Hitting this shortcut enables you to have a quick UI preview of your current SwiftUI code. Furthermore, you can also use this shortcut when working on storyboard.

Shortcut to show/hide preview

Show / Hide Assistant πŸ‘‰ βŒƒβŒ₯βŒ˜β†©

control + option + command + enter

Back in those days where I am still using Objective-C for iOS development, I always use this shortcut to open the assistant editor so that I can work on both .m and .h file side by side.

Nowadays, I mainly use it alongside with storyboard especially when I want to make an IBOutlet connection to the source code, or do a quick update on my source code while working on storyboard.

Shortcut to show/hide assistant

Show / Hide Code Review πŸ‘‰ βŒ₯β‡§βŒ˜β†©

option + shift + command + enter

Sometimes you might need to have a quick look at the changes you have made on your code. Use this shortcut to quickly switch to code review mode and have an overview of what you have changed, once done, just hit the shortcut again to switch back to your normal source editor mode.

Shortcut to show/hide code review

Wrapping Up

To be able to use all these shortcuts proficiently might seem a bit overwhelming at first. However, once you started using them on your day-to-day development work, you should be able to master them in no time.

Just remember, practice makes perfect. πŸ‘

I hope this article gives you a very good idea of how you can improve your productivity by using these 10 amazing shortcuts.

What is your favorite Xcode shortcut? Let me know in the comment section below. If you like this article, feel free to share it.

You can follow me on Twitter for more articles related to iOS development.

Thanks for reading. πŸ§‘πŸ»β€πŸ’»

Originally published at on January 6, 2020.

The Startup

Medium's largest active publication, followed by +568K people. Follow to join our community.

Lee Kah Seng

Written by | iOS developer since 2011 | Swift Lover | Music Addict | Anime Fan | Part-time Backpacker

The Startup

Medium's largest active publication, followed by +568K people. Follow to join our community.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium β€” and support writers while you’re at it. Just $5/month. Upgrade