Document Options Dialog box

Document Type

This pull-down list contains a list of all the document types you have defined so far. When you select a document type from this list, the other text boxes in the dialog box are updated to reflect the properties of that document type. The first entry in the list is always the Default document type, which you may modify, but not remove.

When the Document Options dialog box first comes up, the document type of the current file is automatically selected here.

Add Type

Click this button to add a new document type. You will be prompted for the document type name.

Remove Type

Deletes the selected document type. This action is not undo-able.

Auto Indent

Click this to change the Auto Indent settings for this document type. See also “Auto Indenting”.

File Filter

This text box should contain a delimited list of file name specifications. The entries in the list can be delimited with a space, a semi-colon, or a comma. Each entry can be either an unambiguous file name, or an ambiguous wildcard file specification. The entries should not contain a drive letter or a full path that includes backslashes.

For example,


Given a file name, Source Insight will identify the file’s document type by searching all defined document types looking for a match on a file specification in the File Filter text box. In effect, Source Insight makes two passes through the entire set document type records to determine a file’s document type.

1. First, it tries to find an exact match on the file name in all the File Filter lists.

2. If no exact match is found, it tries to find a wildcard match in all the File Filter lists.

3. If still no match is found, Source Insight assumes the file’s type is the Default document type.

This means that you can treat some individual files in a special way. For example, “*.inc” is normally considered an Assembly File type, but let’s say you have a file called “” that you want to have the C Source File type. In the C Source document type’s File Filter text box, you would include “”:


If you include a simple * as the file filter for a document type, then it will become the default catchall type, instead of the “Default” document type. The catchall will only apply if the file does not already match any other document type.

Adding New File Extensions

You can add new entries to the file filter of a standard document type to make Source Insight include those files also. For example, by default, Source Insight considers C Source Files to be “*.c” and “*.h”. If you also have C source files with .h2 extensions, then you can add “*.h2” to the File Filter list of the C Source File document type.


Whenever Source Insight displays a list of files, such as in the Add Files dialog box, the list is an expansion of the union of all File Filter text boxes in all defined document types. In other words, when you add new document types, those files will also appear in the file lists.

Make options the same as Default type.

If checked then the Editing Options and the Status Bar Options will be taken from the Default document type. This allows you to define many document types, but control their options from one location: the Default document type’s record. The parser settings are not affected, and they remain unique to each document type.

If not checked then Editing Options and the Status Bar Options will be taken from the each individual document type record.

Include when adding to project

If checked, then the Add File command and the automatic add file feature will include this type of file when looking for new files to add to the project.

Font Options Group

Emulate screen fonts when printing

If checked, then Source Insight will attempt to select the same fonts for the printer as you have selected for the screen. If you are using a TrueType screen font, that should work fine. If not checked, then the font setting of the Printer Fonts button is used when printing.

Line up white space

This option only applies if you have selected a proportionally spaced font. Fixed-pitch fonts, such as Courier New, are not affected.

If enabled, Source Insight will attempt to use a fixed width for spaces and tabs so that tabs line up the same way they do with a fixed-pitch font. Programs generally look better with this turned on if you are using a proportional font. If you are tired of using Courier New (or some other boring fixed-pitch font) to view your code, try this!

If disabled, then Source Insight uses the natural widths of characters as reported by the font.

This option is helpful if you have to work with other tools, or people that use tools that display source code with fixed-pitch fonts. You will be able to use a proportional font, and still keep a valid representation of the fixed pitch font indentation.

You can control how Source Insight computes the fixed width of spaces by clicking the Spacing button in the Preferences: Display dialog box.

For more information, see “Character Spacing Options”.

Screen Fonts

Click this button to select a font to use for displaying the file on the screen. The name of the currently selected font is displayed to the right of the button.

Printer Fonts

Click this button to select a font to use for printing the file. The name of the currently selected font is displayed to the right of the button. This setting only has an effect if the Emulate screen fonts when printing option (described above) is turned off.

Parsing Group

Language list

This pull-down list contains a list of all the languages defined in Source Insight. Select from this list to specify how Source Insight should parse and display the current document type. For example, to parse the document as a Java source file, select “Java Language” from the list. You can also select “None” to use no parser.

To add a new custom language, select the item <New Language>.


Click this button to open the Language Options dialog box. From there, you can add a new language, and edit the properties of a language. For example, you can edit the syntax formatting keyword list that is associated with each language. Each language type has its own keyword list. See also “Language Options”.

Custom Tag Type

This pull-down list specifies what type of symbol is found as a result of using the custom parser pattern in the Custom Pattern text box. The list contains all of the possible symbol types. One of the entries in the list says “No Custom Parser”. If that item is selected, then Source Insight does not use the custom pattern. If any other item is selected in the list, then the custom pattern should contain a regular expression pattern for parsing symbol names out of the file.

Custom Pattern

This text box should contain a valid regular expression with one group in it. The group describes what part of the matching pattern is assumed the symbol tag. The symbol parsed by using this pattern is given the type indicated by the Custom Tag Type. If the Custom Tag Type is set to “No Custom Parser”, then this text box is ignored.

Using a custom pattern that allows you to parse some symbols out of files for which Source Insight has no built-in knowledge. For example, the following string parses sections out of .INI files like WIN.INI.


You can define a new document type named “INI File” that uses this custom parsing pattern. Now, when you open a file like WIN.INI, you can jump to any of the section names or see them all in the symbol window.

Status Bar Options

This group controls the appearance of the status bar at the bottom of the program window.

Line, Col, Symbol

The status bar shows the line number, the column number, and the name of the symbol that the insertion point is in.

Line, Col, Char, Byte

The status bar shows the line number, the column position on the line, the character position on the line, and the byte position in the file.

Editing Options Group

This group of items controls how the document type is edited. All files of the selected document type will have the following editing options in effect.

Word Wrap

If checked then Source Insight will automatically wrap words onto the next line when the insertion point moves past the margin width. This only applies while you are typing new text. If not checked then Source Insight will not do any automatic wrapping of text.

Allow auto-complete

If checked, then symbolic auto-completion is allowed for the document type if auto-completion is enabled globally in the Options > Preferences: Typing dialog box.

Allow intelligent paste

If checked, then intelligent paste is allowed for the document type if intelligent paste is enabled globally in the Options > Preferences: Typing dialog box.

Tab Width

The width of a tab character in character spaces.

Margin Width

The width of text in characters spaces before automatic word wrapping will occur

Expand tabs

If checked then Source Insight will expand a tab character to the equivalent number of spaces when you type a tab. The text will look the same as if a tab was typed, but spaces will be used to fill. If not checked then Source Insight will simply insert a tab character into the file when you type a tab.

Enter key inserts new line

If checked then pressing the Return or Enter key while typing will insert a new line. If not checked then pressing Return or Enter will move the insertion point to the beginning of the next line.

Show line numbers

Displays line numbers in the left margin.

Show right margin

Displays a light vertical line at the right margin. If you are using proportional fonts, then the right margin position is only approximate.

Visible Tabs

If checked then Source Insight will display a special symbol where ever a tab characters is, instead of just displaying white space.

Symbol Window

If checked, then files with this document type will have a Symbol Window attached at the left side of their source windows.

Show page breaks

Source Insight will show light horizontal lines that represent the printed page breaks. The pagination is computed based on syntax formatting, and the printer font that is selected.