Command-` | 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 its 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.
Command-D | Smart Open selection |
Command-Control-Shift-D | Simple Open selection |
Command-Shift-D | Open header |
If you select a file name, a partial file path or a full file path and use the Simple Open selection shortcut, Eddie will try to open the selected pathname.
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 follows, separated
from the file name by a colon, Eddie will select the corresponding line in
the resulting opened document. This command is not limited just to header files — source
files or any other files can be opened.
Note that you do not need to actually select the file name, as many other editors require you
to do.
Command-D is a quick way to open a file — just type the file name into the Worksheet and hit Command-D. Combined with tab completion this technique can open a file really quick and is a nice complement to opening Open File panel, etc.
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 Command-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 Command-D. Eddie expands the selection, including the line number, opens the respective file if needed and selects the line with the error.
Command-D works equally well when searching with grep. Add the -n option to have line numbers include in the grep output and click on each line of the search results and hit Command-D to go exactly to the matched line.
The Open header dialog 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.
Eddie uses several techniques to locate files specified to Open Selection and Open Header when just the file name is entered. If it cannot locate the file at the current path, it will use the help of the default Workset (if open) to search all the directories associated with the workset. Next, it will try to locate the file using the indices (tags) used by the Symbols plugin. If you have a Symbols plugin tag file for the directory hierarchy you are currently working on and the file you typed in is anywhere in the current directory hierarchy, it will be found with the help of the local tag file. Next the Symbols plugin tag file for system headers is searched for the specified file. Last the search path defined in UserStartup as the OpenHeaderSearchPath entry is used:
OpenHeaderSearchPath ".:/usr/include/:/System/Library/Frameworks/:.-r"As specified, the OpenHeaderSearchPath will cause the system header directories to get recursively searched, followed by a recursive search of the current directory.
Command-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.
Command-Option-P | Rotate to next document |
Command-Option-Shift-P | Rotate to previous document |
Command-\ | 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.
Command-Option-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.