Advanced Xcode keyboard shortcuts to be more productive
Increase your productivity with these hidden Xcode shortcuts
18 Sep 2019 · 3 min read
Using keyboard shortcuts is key of being productive and efficient when working with a development environment like Xcode. In this post, I will show you my favorite advanced and hidden Xcode shortcuts.
If you are new to Xcode, you may want to checkout my post on basic Xcode keyboard shortcuts first.
Before starting, here is a quick key reference:
- ⌘ - Command
- ⇧ - Shift
- ⌥ - Option/Alt
- ⌃ - Control
1. Quickly open two files side by side
Use ⌘ ⇧ O, then enter the file name, then click ⌥ right before selecting the file. The new file will open in a separate editor, so you can continue working on your current file while having access to the new opened file.
The ⌥ click also works when selecting a file in the project navigator.
2. Quickly jump to a specific method in a file
⌃ 6 in combination with typing the method name
This one is especially useful for bigger files with many methods, where scrolling becomes annoying very fast.
Use ⌃ 6 to open the documents structure, then start typing the methods name, then use enter to jump to the method. You can skip letters when typing, Xcode will do the work for you.
3. Reveal in project navigator
This one is really handy when you want to see the file you are currently working on in project navigator.
5. Filter in navigator
The filter action is different from the standard find. It only will filter for file names.
6. Repeat the last test
This one is really handy when writing tests to repeat the last test you were running.
7. Reindent code
Useful when code is out of place, for example after refactoring. It can be done by cutting and pasting the code or simply with the reindent shortcut.
8. Disable / enable breakpoints
This one can be really useful when debugging your code.
Articles with related topics
Explore Apple's new Swift logging API for iOS 14
Learn how to log events and errors in your iOS app with the new API introduced at WWDC 2020
05 Jul 2020 · 4 min read
Quick tip on how to learn Xcode keyboard shortcuts efficiently
An easy way to memorize Xcode keyboard shortcuts
22 Sep 2019 · 2 min read
Basic Xcode keyboard shortcuts every developer should know
Increase your productivity when working with Xcode
15 Sep 2019 · 3 min read
swift package manager
Quick Guide on Swift Package Manager for iOS
Learn how to use the Swift Package Manager with Xcode to add dependencies to your iOS project
17 Apr 2021 · 6 min read
swift package manager
How to add local Swift Packages to an iOS project
Learn how to add local dependencies to your iOS project by using Swift Package Manager and Xcode
17 Apr 2021 · 2 min read
Latest articles and tips
How to preview SwiftUI views in dark mode
Preview SwiftUI views in dark mode by setting the preferredColorScheme(_:).
08 Nov 2021 · 1 min read
Dynamic colors in SwiftUI
Learn to use the asset catalog or the programmatic approach to define dynamic colors in SwiftUI
08 Nov 2021 · 4 min read
Quick guide to SwiftUI localization
Learn how to support multiple languages in your SwiftUI iOS app.
14 Oct 2021 · 3 min read
How to identify objects when using SwiftUI's List and ForEach
Learn to use the \.self key path and the Identifiable protocol in SwiftUI.
14 Oct 2021 · 2 min read
Understanding actors in Swift
Learn how to use Swift actors to prevent data races when working with concurrency.
12 Sep 2021 · 5 min read