Configuring C/C++ editor formatting
You can configure the C/C++ Code Style Formatter preference page to force the use of spaces instead of tabs for indentation in the C/C++ editor.
Procedure
- Click Formatter preference page. to open the
- Click New to create a new profile.
- In the Profile name field, enter the profile name as GNU [my_company], where my_company is the name of your company or organization, for example, GNU [tpflab].
- From the Initialize settings with the following profile list, select GNU [built-in].
- Ensure that the Open the edit dialog now checkbox is selected.
- Click OK.
- In the Indentation tab of the opened window, select Spaces only from the Tab policy list, and click OK.
- On the Formatter preference page, ensure that the GNU [my_company] profile is selected in the Active profile list.
- Click Apply and Close.