I wanted to configure STM32CubeIDE so that it replaces tab character by spaces, when editing source code. Easy, once one knows where to look :
If you have some existing source code using tabs, you can replace them by spaces by selecting whole file content (Ctrl-A) and correcting indentation (Ctrl-I).
As STM32CubeIDE is based on Eclipse CDT, the above process works for Eclipse CDT as well, of course.