# Source Editor Preferences

Use the Source Editor Preferences dialog box to control the following editor features:

- Indentation/tabs
- Colors
- Fonts

## Indentation/Tabs

Auto Indent | Causes the editor to automatically indent the next line to the same column position as the most recently inserted line.
Indent Size | The number of columns (in space characters) between indent locations. When you press the Tab key, the cursor moves to the next indent location. The default value is four spaces.
Tab Size | The number of space characters the editor converts to one tab character. The default value is eight spaces.

For example, if Indent Size is set to nine characters and Tab Size is set to four characters, the editor will convert the interval between every indent stop to be two tab characters and one space character.

## Colors

If you choose syntax highlighting, the source editor highlights text elements using different colors. Elements are interpreted based on the type of file loaded into the editor.

### Program Source Files

Files with the following extensions are treated as program source:

`.c` | `.jav` | `.h`
`.cc` | `.cpp` | `.hpp`
`.java` | `.cxx` | `.hxx`

The following elements are highlighted in program source files:

Background | The background color of the editor pane
Reserved words | Keywords, plus `true`, `false`, and `null` (language specific keywords are determined by the file extension)
Comments | Text delimited by: `//`, `/*...*/`
Numbers | Any text element that begins with a digit
All other text | Text elements other than those defined above

### HTML Files

Files with the `.html` and `.htm` extensions are treated as HTML document source.

The following text elements are highlighted in HTML files:

Background | The background color of the editor pane
Tags | All text between `<` and `>` characters
Comments | All text between `` characters
Numbers | Any text element that begins with a digit
All other text | Text elements other than those defined above

## Fonts

Name | The font family to use in the source editor. The underlying Java system automatically maps two font families from your native system to the font names: Monospace and DialogInput. The source editor adds to the Name menu whichever of these two fonts it determines are of fixed width.
Style | The style (Plain, Bold, Italic, Bold Italic) of the named font.
Size | The point size of the named font. The source editor does its best to map style and size to your specification. However, the accuracy of this mapping varies depending on your system.
Sample | A sample of the specified font, style, and size.

See also:

  Editing Source