This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to force using tabs

Hello!

In the past, (maybe until I upgraded to v 11), there was a way of using tabs for the editor.

Where is this setting gone? I have tried to uncheck "use spaces instead of tabs" but it doesn't work.

NB: I'm running 11.0.0.00012 on Ubuntu.

Thanks for any hint!

  • Pascal,

    There is an additional place that you will want to set it.  In the preferences dialog make sure to click show advanced settings at the bottom.  Then go to C/C++->Code Style->Formatter.  Then click the edit button beside the CCS profile selection.  There then should be a setting for tab policy.  Sorry I don't have CCS in front of me at the moment so I can't provide a screen shot.

    Regards,

    John

  • Hello John!

    Thanks for your reply, it works fine now. And the formatter allowed me to fine tune my preferences.

    Now one more thing: I'm also using ST chips, and the ST environment allows me to automatically format on save.

    Is there such a setting in CCE?

    Thanks!

    Pascal

  • I haven't tried using it, but in the advanced setting under C/C++ -> Editor -> Save Actions there is a "Format source code" option which can be enabled: