Advanced Xcode keyboard shortcuts to be more productive
In this post, I will show you my favorite advanced and hidden Xcode shortcuts.
Using keyboard shortcuts is key of being productive and efficient when working with a development environment like Xcode.
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
⌘ ⇧ O
in combination with ⌥
Most developers already know the useful Open quickly...
command. And it becomes even more powerful when using it with ⌥
.
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, and 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.

4. Filter in navigator
The filter action is different from the standard find. It only will filter for file names.

5. Repeat the last test
⌃ ⌘ ⌥ G
This one I use a lot when writing tests to rerun the last test.

6. Reindent code
⌃ I
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.

7. Disable / enable breakpoints
⌘ Y
This one can be really useful when debugging your code.

If you are asking yourself, how you can memorize all these shortcuts efficiently, checkout my quick tip on learning Xcode shortcuts.
Did you like this post? Then let me know by leaving a clap.
Like to stay updated? Then follow me here on medium or on twitter or both :-)
Originally published at https://www.tanaschita.com on October 24, 2019.