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:
⌘ ⇧ O in combination with
Most developers already know the useful
Open quickly... command. And it becomes even more powerful when using it with
⌘ ⇧ 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.
⌥ click also works when selecting a file in the project navigator.
⌃ 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.
⌃ 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.
⇧ ⌘ J This one is really handy when you want to see the file you are currently working on in project navigator.
⌥ ⌘ J
The filter action is different from the standard find. It only will filter for file names.
⌃ ⌘ ⌥ G
This one is really handy when writing tests to repeat the last test you were running.
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.
This one can be really useful when debugging your code.