# Getting Familiar with Anjuta

## Menus and shortcuts

At the top of the Anjuta main window is the menubar. Almost all of the functions are available by activating the appropriate menu item. The functions have been grouped according to their type. For example, the file operations have been grouped into the File menu.

### Menubar

Anjuta menubar

Most of the menus and submenus can be detached. Click on the detach bar (the dashed line just above the first menu item). Once the menu is detached, it will become an independent window.

### File menu

File menu

Shortcut keys are available for many of the menu options. All of the shortcut keys are shown alongside the corresponding menu items. A useful reference to the shortcut keys which are not directly attached with the menu is also available in the next section. Some useful shortcuts are listed here.

- Switch Editor page: CTRL-TAB (forward) and CTRL-SHIFT-TAB (backward) -- The pages could also be switched by right clicking on the notebook tabs and selecting an editor tab (useful when all the tabs in the editor are not visible at once). Some desktop configuration 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 avail these shortcuts.

- Context Help: SHIFT-F1 -- Keep the cursor on the word (for example, the function name) for which you want to get the API help and press the shortcut. Context help only works if you have DevHelp installed. If you do not have DevHelp installed, the context help menu and toolbar button will be inactive. You can get it from DevHelp website. You will also have to install the related DevHelp books.

- Auto complete: CTRL-ENTER -- Press the shortcut with the cursor placed at the end of 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 right side of the menu item labels. They could also be changed as explained in the tip below.

### Customize shortcuts

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

## Main Window

In the main window, there are several views which can be reordered 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 of the file commands will apply to this active document. You can switch to any page by clicking on the page 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 the 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 it in the preferences. If a project is open it shows all files inside the project. Double clicking opens a file in the appropriate application as configured in the gnome mime preferences. Right click opens a popup-menu which gives you choices how to open the file.

4. The Symbols window shows shows a tree of available symbols in the project generated from 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. Those displayed in Blue are important messages such as errors or other information. Messages shown in Red are Hot 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 bugs, 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 emulation where you can type commands just like in the gnome-terminal.

### Session management

All of the settings, including the window sizes and window 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.