C/C++ Beautifier

The following options are available:

Main style - Specifies the main function declaration template inserted. Select ANSI C/C++ if you want an old ANSI C main declaration inserted. You can define a template by using aliases, or you can write a replacement function for c_insert_main. The command find-proc c_insert_main will locate the macro source for this function.

C/C++ Preprocessing - Click this button to customize the global preprocessing that is used when Con- text Tagging® creates tag files for C or C++. See C/C++ Preprocessing.

Extensionless C++ Files - Click this button to add names of extensionless C++ header files. SlickEdit® Core takes care of the standard STL headers automatically, but you can use this to add additional com- piler specific headers, such as unodered_set or regex. Note, this setting works in combination with the extensionless header file path regular expression (see below).

Extensionless C++ File Path Regular Expression - In order for SlickEdit Core to safely recognize an extensionless C++ header file as C++ automatically, without accidently attempting to open other exten- sionless files (such as executables) as if they were C++, in addition to requiring that you specify the names of the files (see above), the path that the files are located in must match this regular expression.

C/C++ Beautifier

To beautify a C or C++ document, open the file you want to beautify, then from the main menu, click Format Beautify (or use the gui_beautify command). The C/C++ Beautifier will be displayed, which allows you to make settings for how the code will be beautified.

You can use the commands c_beautify or c_beautify_selection to instantly beautify the file or the selec- tion according to the settings on the Beautifier dialog.

Currently, this beautifier supports beautifying Slick-C®source if the statements are terminated with semi- colons like C.

Note

The C#, Java, JavaScript, and Slick-C Beautifiers contain the same options and settings as the C/C++ Beautifier.

The following buttons and settings are available on the Beautifier:

Beautify - Beautifies current selection or buffer and closes the dialog box.

Reset - Restores the dialog box settings to the values that appeared when you invoked the dialog.

Save Settings - Saves beautify options in uformat.ini file. These settings are used by the c_beautify command.

Restrict to selection - When this option is selected, only lines in the selection are beautified.

237

Page 259
Image 259
Slick V3.3 manual ++ Beautifier