1o essential Xcode shortcuts you shouldn’t work without

Photo by Akshay on Unsplash

When we use a tool every day it is easy to get so used to certain movements that we sometimes forget to think about how we can make our daily work more efficient and more effective. Especially shortcuts or rather the habit of using them as often as possible is a tool we can use to get our work done faster and to concentrate on the most important things. Even though, I know this list by far does not contain all useful shortcuts, these are my most used shortcuts in Xcode:

  • =
  • =
  • =

1. Jump to a specific file aka “Open quickly”

2. Jump to a specific line in a file

3. Search in a file

This is not for looking up some text (⌘ + F) but for looking up e.g. a method name or something similar.

4. Search for a piece of text in the whole project

5. Rename file in scope

6. Comment line out

Just mark the line(s) you want to comment out. Do the same when you want to uncomment some line(s).

Marking some part of your code and apply something to the marked section not only works for comments. It also works for surrounding a section with:

7. Move line up or down

Move line up

Move line down

8. Go back and forward between files

Go forwards in files

Go backwards in files

9. Show file in hierarchy

10. Run all tests

Bonus

Especially when you use SwiftUI this shortcut will come be even more handy. Do the following on a class or function name.

This will open a sub menu with different options. In this short article I want to pull your attention to two of them:

This will show all types that call the clicked element. Which it’s great for debugging for example.

This enables you to rename the clicked element in the whole project.

You can read this post on my blog as well

https://blog.rebekkaorth.com/essential-xcode-shortcuts

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store