How to change Command + Click behavior in Xcode

⋅ 1 min read ⋅ Xcode Development

Table of Contents

There is a behavior change on command + click in Xcode 9 and forward.

Before Xcode 9, when you command + click (⌘ - command + click) on any symbol (method, variable, protocol), it will jump to the definition of that particular symbol.

Before Xcode 9, command + click trigger jump to definition action.
Before Xcode 9, command + click trigger jump to definition action.

Since Xcode 9, command + click will show all commands related to that particular symbol, such as, Jump to Definition, Callers, Edit All in Scope, and Rename.

command + click trigger jump to definition action.
command + click trigger jump to definition action.

How to Jump to Definition in Xcode 9 forward

In the newer version of Xcode, you have to press command + control + click to "Jump to Definition".

Jump to Definition

⌃ – control + ⌘ - command + click

You can easily support sarunw.com by checking out this sponsor.

Sponsor sarunw.com and reach thousands of iOS developers.

How to change Command + Click behavior in Xcode

For me, I prefer the old behavior over the new one because I heavily use Jump to Definition command when I code.

Luckily, Xcode allows us to change this behavior back to pre-Xcode 9.

  1. Open Xcode Preferences.
  2. Go to "Navigation" tab.
  3. Change value of "Command-click on Code" to "Jump to Definition". This will bring back the old behavior.
Xcode preferences.
Xcode preferences.

After this change, you can open up related commands with command + control + click instead.


Read more article about Xcode, Development, or see all available topic

Enjoy the read?

If you enjoy this article, you can subscribe to the weekly newsletter.
Every Friday, you'll get a quick recap of all articles and tips posted on this site. No strings attached. Unsubscribe anytime.

Feel free to follow me on Twitter and ask your questions related to this post. Thanks for reading and see you next time.

If you enjoy my writing, please check out my Patreon https://www.patreon.com/sarunw and become my supporter. Sharing the article is also greatly appreciated.

Become a patron Buy me a coffee Tweet Share
Previous
How to Run code in Release build in Xcode

Learn how to run it on the Release build configuration, which is the one Xcode used for the App Store.

Next
How to Play Haptic Feedback or Vibrate using UIFeedbackGenerator

Learn what Haptic feedback is and how to use it.

← Home