11.3.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 (see Changing your workspace settings for details).

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 ? Advanced to display the Advanced Editing Controls 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 Advanced Editing Controls menu.

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.

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 StudioCodeWarriorRealView Debugger v1.7

Numbers

RedSystem[1]RedBlue

Strings

Magenta

SystemaMagentaGreen

Keywords

Light BlueBlueLight BlueRed

Comments

GreenGreenGreenGreen
IdentifiersBlueBlueBlueSystema

User defined keywords

BlueSystemaBlueBlue
Preprocessor keywordsPurpleBluePurpleRVD17[2]
OperatorsBlueSystemaBlueSystema

[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.

Copyright © 2004, 2005 ARM Limited. All rights reserved.ARM DUI 0227C
Non-Confidential