Formatting page of Visual Studio text editor options

SDI includes a version of the Formatting page for Visual Studio text editor options for Synergy DBL. This page has options that control how Synergy code is indented. To access this page, select Tools > Options, and then select Text Editor > Synergy DBL > Formatting in the navigation pane of the Options dialog box.

You can use one of the two preset formatting schemes on this page (Style 1 or Style 2), or you can customize the formatting settings. Formatting settings are used to format code as you type, when it is pasted in, and when you run the document formatting option (Edit > Advanced > Format Document).

Note

The size of indents is determined by the “Indent size” setting on the Tabs page. In order for code to be formatted as you type, the Indenting option on the Tabs page must be set to Smart. If it is set to None or Block, code will not be formatted as you type, but will be formatted when you run the Format Document option.

Settings on the Formatting page can be imported and exported using Visual Studio’s Import and Export Settings Wizard (Tools > Import and Export Settings). Select the Formatting Dialog Page option on the “Choose Settings to Export” or “Choose Settings to Import” screen of the wizard.

To submit a comment on the Formatting page, use the comment button (Feedback icon) in the top right corner.

To select a formatting scheme:

Choose Style 1 or Style 2. The sample code pane changes to show the differences between the two styles.

To customize the formatting:

Select options from the categories in the center pane. The sample code pane changes to show the effects of your selections. When you click OK, the formatting selections will be saved.

Note

Reselecting Style 1 or Style 2 will undo your customizations and restore the preset style.

Basic Blocks

No indentation in block Contents of the block are left-aligned.
Indent contents of block Contents of the block are indented.

Comments

Indent as statements Comments are indented following the same rules as statements. (Statements are indented following the rules for basic blocks.)
Leave first column alone A comment starting in the first column (i.e., all the way at the left margin) is not indented.

Conditional Blocks

Align begin/end to block A begin/end within a conditional block is aligned with the preceding conditional rather than indented.
Align begin/end to contents A begin/end within a conditional block is aligned with the content of the block.

Continuation Characters

Align to containing statement Continuation characters are aligned with the statement they apply to.
Align to first column Continuation characters are aligned all the way to the left margin.

Directives

Indent as statements Compiler directives are indented following the same rules as statements. (Statements are indented following the rules for basic blocks.)
Align to first column |
Indent .include
.INCLUDE directives are indented, but other compiler directives are aligned all the way to the left margin.
Align to first column |
Do not indent .include
All compiler directives are aligned all the way to the left margin.

Labels

Indent as statements Labels are indented following the same rules as statements. (Statements are indented following the rules for basic blocks.)
Align to first column Labels are aligned all the way to the left margin.
Align to containing routine Labels are aligned with the routine in which they are located.

Lone Begin/End Block

A lone begin/end block is one that is not contained within another begin/end block or a conditional block. It may, however, have another begin/end block within it.

Align contents to begin Contents of the block are aligned with the begin for that block.
Indent one level Contents of the block are indented one level.

Routines

No indentation in block Contents of the block are aligned with the routine.
Indent contents of block Contents of the block are indented.
Indent contents of block |
Leave data div alone
The contents of the block, including param definitions, are indented. The rest of the data division is not indented.
Indent contents of block |
Leave param div alone
Except for param definitions, contents of the block are indented. Param definitions are aligned with the routine.
Indent contents of block |
Leave data/param divs alone
Except for the data division (and param definitions), contents of the block are indented. The data division (including param definitions) is not indented.

On Document Reformat

Indent data division field elements

Indents code-line comments (comments on lines with code) to the specified column. If the specified column occurs before the end of the code on that line, the comment on that line is not indented.

Align data division field elements

Aligns field definition elements (field name, data type, initial value) so that elements of the same type start on the same column. For example, field names will be indented so that they all start on the same column.

Comma placement

Next to variable Positions each comma next to the element that precedes it in a field definition. For example, if you have these field definitions
in opt arg1 , a20 ,  "some text"
in opt argTwo  ,  a100      ,"more text"
they become
in opt arg1,        a20,     "some text"
in opt argTwo,      a100,    "more text"
Next to data type Positions each comma next to the element that follows it in a field definition. For example, if you have these field definitions
in opt arg1 , a20 ,  "some text"
in opt argTwo  ,  a100      ,"more text"
they become
in opt arg1        ,a20    ,"some text"
in opt argTwo      ,a100   ,"more text"

Tab stops between elements

Specifies the number of tab stops between data field elements.