C/C++ Formatting Options

C and C++

This section describes some of the advanced features and options that are available in SlickEdit® Core for C and C++, including extension-specific formatting options, the C/C++ Beautifier, compiler settings, and preprocessing.

The default editing mode in SlickEdit Core for C and C++ allows for programming in either language. If you are coding to strict ANSI C standards, you should configure the value of the macro variable def_ansic_exts to contain a space-delimited list of extensions for files you want interpreted as ANSI C. To set the macro variable, press Esc to bring up the SlickEdit Core command line, then type set-var def_ansic_exts "<extensions>", where <extensions> is the space-delimited list of extensions.

For example:

set-var def_ansic_exts "c h"

Please note that if you also code in C++ and any of these extensions are used for C++, they will be inter- preted as ANSI C.

C/C++ Formatting Options

Options are available for C and C++ language file extensions for changing smart indenting and styles for template editing. To access these options, from the main menu, click Window Preferences, expand SlickEdit and click General in the tree, then double-click the File Extension Setup setting. Make sure the C/C++ language extension you want to work with is selected in the Extension drop-down list, then click the Options button. The Formatting Options dialog specific to the file extension you have selected is displayed.

Note

Languages similar to C/C++ have similar Formatting Options dialogs which are not specifically documented.

The tabs on the C/C++ Formatting Options dialog are described below.

Begin-End Style Tab

Figure 7.3. C/C++ Formatting Options: Begin-end style Tab

233

Page 255
Image 255
Slick V3.3 manual C++, ++ Formatting Options, Begin-End Style Tab