Code Formatter Wizard

Code Formatter Wizard

This Wizard is used to Format Code in IDE. Now only Supports Pascal.

With the Default short Ctrl+W, You can Format Current Pascal Source File or Selection in Editor. If Formatting Section, Section will be Extended to Whole Lines before Formatting.

Settings

The Setting Dialog of This Wizard is as below:

- Common Settings

- Keyword: Specify how to Process Keywords. Default is Lower Case.

- Begin Style: Specify where to Put "begin" when Meeting Structureed Statements like if...then or with...do. Defaultly Put to Next Line. Note: This Option does NOT Affect Procedure or Function Body.(Always use Next Line.)

- ̵Tab Indent: Space Count for Tab Indent. Default is 2.

- Space Before Operator: Space Count before an Operator. Default is 1.

- Space After Operator: Space Count after an Operator. Default is 1.

- Auto Wrap: There are 2 Line Width in Auto Wrap Setting: the Smaller One "Break Line Width" and the Bigger One "Exceeding Width". When a Line Exceeds the "Exceeding Width", it will be Broken to Next Line at "Breake Line Width". This Feature can avoid some Minor Contents at Next Line when the Original Line is a Little Longer than "Exceeding Width".

- Single Line Mode for Every Uses Unit: If Checked, Every Unit Name in Uses Area will Occupy One Line, Otherwise Use a Simple auto Wrap Mode with the above Break Line Width.

- ASM Settings

- Line Head Indent: Space Count at Line Head (Except Label) in Inline ASM Code. Default is 8.

- Tab Width: Tab Width in Inline ASM Code. Default is 8.

- Do NOT Format Content between {(*} and {*)}: If Checked, Contents between {(*} and {*)} won't be Formatted and will Keep its Original Format.

- Shortcut: Change Shortcut for Menu Items Here.

- OK: Confirm modification.

- Cancel: Cancel this modification.

- Help: Show this help.

Limitation and Known Problems

- About Compiler Directive: We Treat Compiler Directives as Comments. So if You have Code such as {$IFDEF XXX} var A: Byte; {$ELSE} Word;{$ENDIF}, Code Formatter will Raise Error. Please Notice it.

- About Comment: We Keep the Original Format when Processing Comments, basically NO Change compared to Formatting Results. So maybe seems NOT so Good.

- Settings Limited: Now This Wizard only Provides A Few Settings. We'll Provide More Later.

- C/C++ Code: Not Supported yet.

Links

Basic Operation

CnWizards Settings

About CnWizards

Copyrights 2001-2015 CnPack Team