### Keyboard shortcuts for navigating documents

#### Swapping with a header file

Alt-Tab | Swap with header file

To get from a .h file to the corresponding .c or .cpp file quickly, use the SwapWithHeader shortcut. If you have a .h file open and use this shortcut, Eddie will look at a all it's open windows to try to find a corresponding .c, .cc, .cp, .cpp, etc. file. If it doesn't find one, it will look in the directory of the .h file. If a workset window is open, the directories in the workset are also used to search for the corresponding .c, .cc, .cp, .cpp, etc. file. If you use SwapWithHeader in a .c, .cpp, .cc, .cp, etc. file, the .h file will be opened.
Note that SwapWithHeader will also try to find a corresponding header for a .l (Lex) or .y (Yacc) file.

#### Opening a selection

Alt-Win-D | Open selection
Alt-D | Smart Open selection
Alt-Control-D | Open header

If you select a file name, a partial file path or a full file path and use the Open selection shortcut, Eddie will try to open the selected file.

If you place a cursor anywhere inside a file name, partial file path or full file path and use the Smart Open selection shortcut, Eddie will try to expand the selection to include the entire path and open the selected file. If a line number, separated from the file name by a colon follows, Eddie will select the corresponding line in the resulting opened document. When compiling files with gcc Smart Open selection is your friend - this is the easiest way to get to an error in a source file. Just place the cursor anywhere in the file name, hit Alt-D and the file will open with the respective line selected.

In the following example we are trying to compile the file test.cpp using gcc. In the file the variable b is not declared and gcc gives us an appropriate error message:

Place the cursor in the file name in the first error message and hit Alt-D. Eddie expands the selection, including the line number, opens the respective file if needed and selects the line with the error.

Due to it's versatility you will most likely always use Smart Open selection, Open selection is only useful when opening files with spaces in the path.

If you use Open selection with an empty selection or if you use the Open header shortcut, Eddie will display the Open header dialog that allows you to type in the name of the header file you would like to open. A popup menu of recently opened header files is also available.

The search path used by the Open selection and Open header calls is defined in UserStartup by the OpenHeaderSearchPath entry.

`OpenHeaderSearchPath ".:/boot/develop/headers/:.-r"`

If a workset window is open, the directories in the workset are also used to search for the selection.

#### Cycling through windows

Alt-0 | Open worksheet

Activates the Worksheet window. If you do not have a Worksheet open, Eddie will try to open it. If you do not have a Worksheet document, Eddie will ask you, if you would like to create one.

Alt-<1-9> | Bring first 9 documents to front by number
Alt-Win-P | Rotate to next document
Alt-Win-Shift-P | Rotate to previous document
Alt-\ | Swap with next document

The Rotate to next and Rotate to previous let you cycle through all the open windows in the order in which they are layered. The Swap with next allows you to go back and forth between the top two documents.

Alt-Win-0 | Open the default workset

Activates the default workset if you have one open. Currently, if you have more than one workset open, the default one is the first one opened.