Editors control how you interact with project files that are opened in the editor pane.
You can open a file by:
- Selecting ,
then browsing to and selecting the appropriate file in the file selector.
- Right-clicking the file's entry in the Project Explorer (or any of the navigation views)
and selecting Open from the context menu.
- Double-clicking the file's entry in any navigation view.
Note:
If you open a file using this first method, the IDE uses the default editor.
If you use either of these last two methods, the IDE uses the last editor selected for the file.
The default editor depends on the file type. For example, header files (.h) and source code files
(.c and .cpp) are opened with the C/C++ editor, makefiles with the Makefile editor,
and binary files with the Default Binary File editor. This last editor displays the assembly code with the corresponding
program statements in comments.
The C/C++ editor facilitates coding in C and C++, providing features such as syntax highlighting, auto-completion, and
auto-indenting. It also provides tooltip (hover-based) help; when you position the pointer over the name of a function or
macro defined in the standard library, a popup window shows the component's definition.
To open a file using a particular editor:
- Right-click the file's entry in the Project Explorer, select Open With,
then select the desired editor.
The list of available editors varies with the file type but there are always entries of:
- System Editor
- Use an external program to open the file. Clicking this entry brings up a list of available system programs,
similar to Windows Explorer when you select Open With on a file.
- Default Editor
- Use the default editor for this file type. This option is handy if you previously selected another
editor but want to revert to the default editor.
- Other
- Clicking this entry brings up the Editor Selection window, which lists all
editors built into the IDE. Note that most file types can be opened only with certain editors.
The file is then displayed in the editor pane. You can open the same file with multiple editors but each editor will
display the file in a separate window.
For general information about editors, see the entry in the Workbench User Guide.