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), .y (Yacc) or .rl (Ragel) 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.
Another super-fast way of opening source files is by using the Open Quickly window (Cmd-Shift-D).
The Open Quickly dialog uses approximate matching, tolerating miss-spellings. This allows you to type a handful of characters (i.e. literally, as few as 3-4 in most cases) to have the file of interest float up to the top of the list, then hit return to open it. You may ignore case when typing the fragment or if you do include the correct case when typing, the suggestions will be that much more accurate. Alternately you may just choose to type a handful of characters and scroll around to find your file. Note that all of this is so much more easier and intuitive to experience than it is to describe, so just give it a try.
Before opening the desired file, you may check the "As Tabs" checkbox - this will open the resulting file as a new tab in your frontmost document.
All of the above methods of quickly opening files use a comprehensive method of locating the files. With the help of the Symbol Lookup indexer Eddie can locate files in your project as well as in the standard system header file locations.
Additionally, Eddie will use the help of the default Workset (if open) to search all the directories associated with the workset.
Finally, 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.