# Getting Familiar with Anjuta

## Menus and shortcuts

At the top of the Anjuta main window is the menu bar. You can access almost all of Anjuta's functionality through menu items. Operations have been grouped according to their type. For example, file operations have been grouped into the File menu.

### Menubar

Anjuta menubar

### File menu

File menu

Shortcut keys are available for many menu items. All shortcut keys are shown alongside the corresponding menu items. Some other useful shortcuts are listed here.

- Switch Editor Page: CtrlAltPage Up (forward) and CtrlAltPage Down (backward). You can also switch pages by right-clicking on the notebook tabs and selecting a filename from the pop-up menu (useful when all the tabs in the editor are not visible at once). Some desktop configurations may already have these shortcut keys assigned. In that case, you will need to reconfigure them (not in Anjuta, because they are fixed) if you want to use these shortcuts.

- Context Help: ShiftF1. Place the cursor on the word (for example, the function name) for which you want to get API help and type this shortcut. Context help only works if you have Devhelp installed; otherwise, the context help menu and toolbar button will be inactive. You can get Devhelp from the Devhelp website. You will also have to install the related Devhelp books.

- Autocomplete: CtrlEnter. Type this shortcut with the cursor placed at the end of an incomplete word and a list of words matching the remaining part will appear. Scroll and select the right word from the list if you find one.

- More shortcuts: Look for the shortcut keys displayed on the right side of menu item labels. Shortcuts can also be changed as explained in the tip below.

### Customize shortcuts

You can change the default shortcuts by choosing Edit Preferences and selecting the Shortcuts tab.

## Main Window

The main window contains several view windows which can be rearranged by dragging on their title bars. They can also be minimized by clicking on the minimize buttons on the left of title bars.

1. The Documents window will have one document active at a time (if there are any files opened). All file commands will apply to this active document. You can switch to any document by clicking on its tab. You can do the same by right-clicking on the page tabs and choosing the document from the pop-up menu that will appear. This is especially useful when you have a lot of files opened, but not all of them are visible in the page tab area.

2. The Project window shows a tree of project files if you have a project opened. Otherwise, the Project window is usually hidden. Double-clicking on any item in the Project window will open that file.

3. The Files window shows a file tree. If no project is open, the file tree usually points to the file system root but you can change this in the preferences. If a project is open, the window shows all files in the project. Double-clicking opens a file in the appropriate application as configured in the GNOME MIME preferences. Right-clicking opens a context menu which gives you choices about how to open the file.

4. The Symbols window shows a tree of available symbols in the project generated from the ctags parser. Double-clicking opens an editor window with the corresponding file and line.

   There is also a Search tab in the Symbols window where you can search for symbols.

5. The Message window will list all the messages (both `stdout` and `stderr` outputs) when an external command is executed. The Message window is usually hidden, but appears as soon as an external command is executed, such as during file or project compilation, debugging sessions, searches, and many other operations. Anjuta also adds its own messages here when necessary.

   The colors used to display the messages are important. Messages displayed in the standard foreground color (usually black) are normal messages. Messages displayed in orange are warnings, and those displayed in red are errors. Warning and error messages are linked: double-clicking on such a message will take you to the particular file and line number specified in the message.

   For example, when you compile a file which contains errors, some red messages will appear showing what the problems are, and where they occur. Double-clicking on such messages will open the file and highlight the line containing the error.

6. The Terminal window is a terminal emulator where you can type commands just like in the GNOME Terminal application.

### Session management

All settings, including window sizes and positions, are saved when you exit Anjuta. Session management is still under development, so you should not exit Anjuta with any unsaved documents. Anjuta will display a warning if you try to exit with unsaved documents still open.