CONFIGURING THE EDITOR

11.2 CONFIGURING THE EDITOR

The editor may be configured using two dialogs: • Editor Options Dialog

• Editor Color Customization Dialog

11.2.1 Editor Options Dialog

You can set editor properties in the Editor Options dialog. Select Edit>Properties or right-click in a file (editor) window and selecting Properties.

• Editor Tab • Text Tab • Sizes Tab

11.2.1.1 EDITOR TAB Set up editor properties using the Editor tab on the Editor Options dialog as shown in

Table 11-1. TABLE 11-1:

EDITOR OPTIONS DIALOG

Description Line Numbers

Option

When checked, line numbers are visible in the display. Print Line Numbers

When checked, line numbers are printed out. Enable Color Printing

When checked, print-out will be in color. This is useful for preserving syntax information.

Word Wrap When checked, word wrap is enabled. Auto Indent

When checked, a new line is automatically indented by the same number of spaces and/or tabs as the line above it.

Protect Read Only Files When checked, read-only files cannot be edited. When unchecked, you can edit the file and save the changes to another file.

Enable Variable Mouseover When checked, hovering mouse over a variable will pop up Values

its value.

Show Address in Mouseover When checked, prepends the address to the mouseover, e.g., ‘Addr = 0x0003 Name = 0x00’

Double-click Toggles Breakpoint When checked, double-clicking on a line will alternately

enable/disable the breakpoint. When unchecked, double-clicking selects the text under the caret.

Find Wrap MessageBox When checked, a message box is displayed when the find wraps top or bottom, in addition to the current message of “Find Wrapped” in the status bar position panel.

Use Tabbed Window When checked, displays tabs within a single window, instead of separate windows for each file.

11.2.1.2 TEXT TAB Set up text properties using the Text tab on the Editor Options dialog.

11.2.1.2.1 Fonts

• Select Font – Click to select the editor font. For Unicode-enabled operating systems only: In the National Language Code Page:

field, select the value to be used to translate from Unicode text to ANSI.

DS51519A-page 152

 2005 Microchip Technology Inc.

Using the Editor

11.2.1.2.2 Colors

• Choose Colors – Click to select the context-sensitive colors in the Editor Color

Customization Dialog. Determine the context under Text Mode. • Default Colors – Click to revert to default context-sensitive colors. • User Defined Color File – Color may also be applied to keywords you define in a

file. Create the file as specified below, then enter or browse to the file to select it in this tab of the dialog. Click on Choose Colors to assign colors to your selected file keywords.

- The format of the file should be one keyword per line with a carriage return

after each keyword. - Keywords in the file must be alphanumeric with an alpha character as the first

character. Keywords that use other characters will be ignored. - Keywords should be unique. If you choose an already defined directive or

reserved keyword, then the color displayed is indeterminate.

11.2.1.3 SIZES TAB Set up sizing properties using the Sizes tab on the Editor Options dialog.

Option

Description

Tab Size Enter a value between 1 and 16 to specify the width of tabs. Insert spaces – Select this to insert spaces up to the next tab position when you type a tab into text. Keep tabs – Select this to insert a hard tab character when you type a tab into text.

Gutter Size Enter a value between 3 and 12 to specify the gutter width on windows that have gutters.

Default Window Enter the size you would like the editor window to use as a default, as the Size

number of characters displayed horizontally.

11.2.2 Editor Color Customization Dialog

You can set color options to be used by the editor in the Editor Options dialog, Text tab. The colors will be used for all files which will be opened subsequently having the same syntax type as the currently active source file.

The color change dialog contains a list of specific symbol types which have their own coloring. The meaning of each kind of symbol type depends on the kind of file being colored. As each symbol type is selected, the “Foreground Color” and “Background Color” buttons show the current colors for that type. To change a color, click on the button and the Colors dialog will come up to allow you to design a new color. You may also specify that a symbol type appear in bold and/or italic face by checking the appropriate box. If you want to see the effect of your current changes without closing the dialog, click Apply. Otherwise your changes will take effect when you click OK, which closes the dialog.

Syntax coloring identifies text in each of the following categories. The syntax type of the source file determines which category a piece of text belong in.

• ALL Settings – global color setting for all categories • Whitespace – “invisible” characters such as spaces and tabs • Special Symbols – punctuation and operators • Floating-Point Numbers • Implicit-Base Numbers – numbers in the default number base for the file • Binary Integers • Octal Integers

 2005 Microchip Technology Inc.

DS51519A-page 153

MPLAB ® IDE User’s Guide

• Decimal Integers • Hexadecimal Integers • String Constants • Character Constants • Preprocessor Directives • Trigraphs and Digraphs – special key combinations used to represent Special

Symbols which do not appear on the keyboard (obsolescent C feature) • Comments • Labels • Reserved Words • Bad – invalid characters • Editor Window – text not belonging in any of the above categories • User Defined File – text defined by the user file specified on Text tab