Formatter Options

From RAD Studio
Jump to: navigation, search

Go Up to Language Options


Tools > Options > Language > Formatter

Pages in the Formatter group define the formatter options that customize the behavior of the source code formatter. When you select an option, help for the option is displayed in the lower pane of the page.

Delphi and C++ formatting options

Different sets of formatting options are used to format C/C++ and Delphi source code files:

  • In pages under C++, you can set options to be used in C++ projects for C/C++ source code files with the following extensions: *.cpp, *.cxx, *.cc, *.c, *.hpp, *.hxx, *.hh, *.h.
C++ contains the Indentation, Spaces, Line breaks, and Align pages.
  • In pages under Delphi, you can set options to be used in Delphi projects for Delphi source code files with the following extensions: *.pas, *.dpr, *.dpk, *.dpkw, *.inc.
Delphi contains the Indentation, Spaces, Line breaks, Capitalization, and Align pages.

Profiles and Status page

In the Profiles and Status page you can manage sets of formatter options, enable the source code formatter, and enable the Confirmation prompting message before the formatting commands.

Managing sets of Formatter options

The source code formatter has several predefined sets of formatting options. You can select the active set with Select profile. Then the set of formatting options stored in the selected formatter profile (configuration file) becomes the currently used set of options for the formatter.

You can customize the active set of options and save it in a formatter configuration file using Save As. Later you can load the set of options (stored in a configuration file) using Load.

Managing Formatter's behavior

Options in the Formatter Status group define the formatter behavior:

  • Enable Formatter -- Select this option to enable the formatter. If this option is unselected, then all menu commands responsible for formatting of source code files become hidden and inaccessible.
  • Show Confirmation dialog box -- When selected, the Confirmation prompting message appears each time you try to activate any formatting command.

Editor options used by Formatter

The source code formatter uses the Use tab character, Block indent, and Tab stops options that are defined in the Source Options page (Editor Options > Source Options) of the Options dialog box.

  • To set these options for Delphi, select Pascal in Source file type.
  • To set these options for C++, select C/C++ in Source file type.


See Also