13.4.2. Formatting text

Where a file can be edited, you can format your source code to:

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.

For more details on formatting text see:

Shifting text left or right

To shift blocks of text left and right:

  1. Select a block of text.

  2. Select Edit → Format to display the Format menu.

  3. 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 Editing Controls menu.

Changing case

To change the case of selected blocks of text:

  1. Select a block of text.

  2. Select Edit → Format to display the Format menu.

  3. Select either abcd → ABCD, to change all text to uppercase, or ABCD → abcd, to change all text to lowercase.

Enabling source code color

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.

Table 13.1 shows the color scheme used if text coloring is enabled.

Table 13.1. Text coloring scheme

Name

Color

Numbers

Blue

Strings

Lime green

Keywords

Red

Comments

Gray background

User defined keywords

Yellow

Standard C and C++ source coloring is auto-enabled based on file extension. The default list is defined in the Edit 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.

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B
Non-Confidential