Familiarize Yourself with AppCode Navigation
Navigation means how fast you switch between the pieces of code you are working on. The faster you switch, the more productive you are. Here is a list of notable features which make your navigation experience smooth.
- Recent files
- Navigation bar
- Navigate between methods
- Navigate to anything
- Select in
- Other notable features
Most of the time you work with a final set of files. It means you have to switch between them quickly all the time. The real time-saver here is action called Recent files via ⌘E . By default the focus is on the last accessed file. By the way, you can open any tool window through this action.
Another useful feature similar to Recent files is Recently edited files, available via ⇧⌘E . This is the easiest way to get back to the code you are working on.
Refer to the section Navigating to Recent File for details.
When you are not switching between files, you probably navigate within a file. The shortest way to do it is to press ⌘F12 . Pop-up window shows you the structure of the current file and allows you quickly navigate to any item. Just as always, you don’t need to touch mouse.
Note that the speed search works here as well. The second press of the shortcut displays inherited members.
Refer to the section Navigating with Structure Views.
Just like the task switcher in an operating system AppCode provides a switcher between opened files and tool windows. The action is available via ⌃⇥.
Find the detailed description in the section Navigating Between Files and Tool Windows.
Another useful feature worth to mention is Jump to navigation bar via ⌘↑. The navigation bar in the top of the window is useless most of the time. That’s why developers usually hide it and call on demand via a shortcut.
The navigation bar supports the speed search and other actions, such as code generations, documentation pop-up, etc.
Navigate between methods
If you need to jump over the methods quickly, just press ⌃↑ or ⌃↓.
A similar action for navigating between braces is available via ⌥⌘[ and ⌥⌘].
Refer to the section Navigating Between Methods and Tags for details.
Navigate to anything
The next feature that is practically one of the most used in AppCode, is Navigate to Class, File and Symbol.
This feature is available via ⌘O supports sophisticated expressions, including camel humps, path, line navigate to, middle name matching and many more. If you call it twice, it shows you the results out of the project classes.
Just like for classes, it works for files as well, via ⇧⌘O. The results are sorted by relevance to an expression.
And finally, the most tricky feature is to navigate to a symbol via⌥⌘O. AppCode constantly maintains the index of all symbols in project (and within libraries as well) for quick resolve and navigation. So you can type an expression and find a method or a field you need in a second.
Find more details in the section Navigating to Class, File or Symbol by Name.
And finally if you need to open the file in a particular tool window (or Finder/Explorer) you can do it via Select In action by pressing ⌥F1.
This feature is described in the section Navigating Between IDE Components.
Other notable features
- Navigate to line number via ⌘L
- Related files via gutter icons
- Navigate to declaration via ⌘B
- Navigate to super via ⌘U
- Navigate to implementations via ⌥⌘B
- Navigate to the last edit location via ⇧⌘⌫
- Navigate to the next or previous error or warning via F2 and ⇧F2
- Navigate to a related unit test via ⇧⌘T
Refer to the section Navigating Through the Source Code for more information.