The AppCode editor is the main part of the IDE that you use to create, read and modify code.
The editor consists of the following areas:
The scrollbar shows errors and warnings in the current file.
Breadcrumbs help you navigate inside the code in the current file.
The gutter shows line numbers and annotations.
Tabs show the names of the currently opened files.
You can use various shortcuts to switch between the editor and different tool windows, change the editor size, switch focus, or return to the original layout.
Maximize editor pane
In the editor, press ⇧⌘F12. AppCode hides all windows except the active editor.
Switch the focus from a window to the editor
Press ⎋. AppCode moves the focus from any window to the active editor.
Return to the editor from the command-line terminal
Press ⌥F12. AppCode closes the terminal window.
If you need to keep the terminal window open when you switch back to the active editor, press ⌃⇥.
Return to the default layout
To save the current layout as the default, from the main menu select. You can use the same shortcut ⇧F12 to restore the saved layout.
Jump to the last active window
Use the switcher for navigation
To jump between the opened files and tool windows with the switcher, press ⌃⇥.
Keep ^ pressed to leave the switcher popup open.
Press ⇥ to move between elements. Press ⌫ to remove the selected file from the list and close it in the editor.
Change the IDE appearance
You can switch between schemes, keymaps, or viewing modes.
In the Switch menu, select the option you need and press ⏎. Use the same shortcut ⌃` to undo your changes.
You can close, hide, and detach editor tabs. Every time you open a file for editing, a tab with its name is added next to the active editor tab.
Open or close tabs
To close all opened tabs, selectfrom the main menu.
To close all inactive tabs, press ⌥ and click on the active tab. In this case, only the active tab stays open.
To close all inactive tabs except the active one and the pinned tabs, righ-click any tab and select Close Others.
To close only the active tab, press ⌘W. You can also click the mouse's wheel button anywhere on a tab to close it.
To reopen the closed tab, right-click any tab, and from the context menu, select Reopen Closed Tab.
To open a new tab at the end of the already opened one, select the Open new tabs at the end in the tab settings.
Move, remove, or sort tabs
To move between tabs, press ⇧⌘] or ⇧⌘[.
To place the editor tabs in a different part of the editor frame or hide the tabs, right-click a tab and select Configure Editor Tabs to open the Editor Tabs settings. In the Appearance section, in the Tab placement list, select the appropriate option.
To sort the editor tabs alphabetically, right-click a tab and select Configure Editor Tabs to open the Editor Tabs settings. In the Tab order section, select Sort tabs alphabetically.
Pin or unpin a tab
You can pin an active tab in the editor so that it will stay open when the tab limit is reached or when you use the Close Others command.
To pin or unpin an active tab, right-click it and select Pin Tab or Unpin Tab form the context menu.
To close all tabs, but the pinned ones, right-click any tab and select Close All but Pinned.
To assign a keyboard shortcut for the Pin tab action, in the Preferences dialog ⌘,, go to , find the Pin Active Tab action, right-click it, select Add Keyboard Shortcut, and press the key combination you want to use.
Detach a tab
To detach an active tab, press ⇧F4.
Drag the tab you need outside of the main window and drag the tab back to attach it.
You can also use ⌥+mouse for the same action.
In the Project tool window, select a file you want to detach and press ⇧↩.
Switch between tabs
You can switch between recently viewed tabs or files.
In the editor, press ⌃⇥. Keep pressing ^ for the Switcher window to stay open. Use ⇥ to switch between tabs and other files.
Assign a shortcut for the opened tab
Change the default tab limit
AppCode limits number of tabs that you can open in the editor simultaneously (the default tab limit is 10).
Hide editor tabs if there is no more space
Change the font size in tabs
You can use several options to split your screen.
In the editor, right-click the desired editor tab and select how you want to split the editor window (Split Vertically or ). AppCode creates a split view of the editor and places it according to your selection.
As an alternative, from the main menu, select Split and Move Right or Split and Move Down option.and the
If necessary, you can assign keyboard shortcuts for these actions. To do this, in the Preferences dialog ⌘,, go to , find the Split Verically or Split Horizontally action, right-click it, select Add Keyboard Shortcut, and press the key combination you want to use.
Good to know
View quick definition of a symbol (tag, class, method/function, field, and so on.)
AppCode displays the information in a popup. If you need, click the icon to open the Find tool window with the item's definition and its usages.
View quick documentation for a code element or a file.
AppCode displays a popup with the appropriate information.
You can press F1 twice to open the popup in the Documentation tool window. (Press same shortcut to switch back to the popup).
If you invoke the quick documentation popup when you look for a class ⌘O, you can look up the documentation on any class displayed in the list. To switch focus to the popup, press the same shortcut.
View the context information.
The action shows the current method or class declaration when it is not visible.
View a description of the error or warning at the caret.
Click the code analysis marker to see the list of found errors. Use F2 or ⇧F2 to navigate to next or previous error.
Copy tooltip text to the clipboard.
Hold ⌥ and click the tooltip
With this action, you can save some important information that is shown in a tooltip instead of, for example, making a screenshot.
View all usages for code element.
To control the usages highlighting, select or clear the Highlight usages on element at caret option, in (the Highlight on Caret Movement area).
If you turn on the Power Save mode (), the usages are not highlighted.
Useful editor configurations
Check the following popular configurations:
Configure code formatting
Configure fonts, size, and font ligatures
Change the font size in the editor
Configure the color scheme settings for different languages and frameworks
Open the Color Scheme node and select the needed language or framework. You can also select the General option from the node's list to configure the color scheme settings for general items such as code, editor, errors and warnings, popups and hints, search results, and so on.
Configure code completion options
Configure the caret placement
Select the Allow placement of caret after end of line option to place the caret at the next line in the same position as the end of the previous line. If this option is cleared, the caret at the next line is placed at the end of the actual line.
Select the Allow placement of caret inside tabs option to help you move the caret up or down inside the file while keeping it in the same position.
Configure the behavior of trailing spaces on save
For example, when you save your code either manually or automatically and want to preserve trailing spaces on the caret line regardless of what option is selected in the Strip trailing spaces on save list, select the Always keep trailing spaces on caret line option.
Configure the editor appearance options
Manage the appearance for long lines
Configure smart keys
You can configure a certain behavior for different basic editor actions depending on the language you use.
For example, you can select the Jump outside closing bracket/quote with Tab option to enable navigation outside the closing brackets or quotes with ⇥ when you type your code.