| |||
| Home > Editing Source Code > Editing text > Formatting text | |||
Where a file can be edited, you can format your source code to:
shift text left or right
change case
change capitalization
enable source code coloring.
Use the Edit menu to set these options
for the current session. To make the new setting the default when
starting up the File Editor, you must change the Edit settings
in your workspace (see Changing your workspace settings for details).
For more details on formatting text see:
To shift blocks of text left and right:
Select a block of text.
Select Edit ? Advanced to display the Advanced Editing Controls menu.
Select either Shift Lines Left or Shift Lines Right as required.
The File Editor shifts the selected text a designated number of characters to the right or left by inserting or deleting spaces at the beginning of every line in the selection. The amount that text is shifted is determined by the value specified for the Shift Width... setting on the Advanced Editing Controls menu.
When working in the File Editor you can color source code as an aid to readability. This feature is enabled by default when you first start RealView Debugger. If source coloring is disabled, all text is the same color, usually black.
You can choose a color scheme from one of the following:
Default
Visual Studio
CodeWarrior
RealView Debugger v1.7.
The defaults change depending on the scheme you choose. Table 11.1 shows the default colors used for each scheme if text coloring is enabled.
Table 11.1. Default text coloring for each scheme
Name | Default | Visual Studio | CodeWarrior | RealView Debugger v1.7 |
|---|---|---|---|---|
Numbers | Red | System[1] | Red | Blue |
Strings | Magenta | Systema | Magenta | Green |
Keywords | Light Blue | Blue | Light Blue | Red |
Comments | Green | Green | Green | Green |
| Identifiers | Blue | Blue | Blue | Systema |
User defined keywords | Blue | Systema | Blue | Blue |
| Preprocessor keywords | Purple | Blue | Purple | RVD17[2] |
| Operators | Blue | Systema | Blue | Systema |
[1] This is set from your current system settings. [2] Yellow text on black background. | ||||
Standard C and C++ source coloring is auto-enabled based on
file extension. The default list is defined in the Text settings
in your workspace and can be changed if required. Specify file extensions
as a comma-separated list which must not include dots or periods,
for example c,cc,cxx,cpp,h,hpp.