2018-09-02 07:02 PM
I use STM32 workbench for previous project and TruStudio for new project, when I copy some source code to TruStudio, it is not align properly, is there any shortcut for TruStudio can do alignment easily?
Solved! Go to Solution.
2018-09-19 05:43 AM
Hello Nickname3026,
Under Eclipse IDE (like SW4STM32 or TrueStudio) you should configure style formatter like this:
Window -> Preferences -> C/C++ -> Code Style -> Formatter
By default K&R profile is selected. With Tab size = 4 for indentation
You can create a new profile with your prefered settings.
Then if you want to indent correctly a source code, select all the file (CTRL+A) then right cliq and choose Source menu and Correct indentation (or directly with CTRL+I)
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-09-02 08:31 PM
I'd probably look under Tab or Editor settings.
2018-09-04 05:42 AM
Hi,
Instead of copying code, why don't you port your project to TrueSTUDIO?
If you open a project based on SW4STM32 with Atollic TrueSTUDIO, it will automatically ask you to convert current project to an Atollic TrueSTUDIO project.
You need to build the project after that to check if any update is required later (generally no update is required, but may be some include paths need to be checked).
Just pay attention to avoid long paths for project location, it may generate compilation errors.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-09-18 08:15 PM
Hi Amel,
I did a number of SW4STM32 projects, sometime I just copy a part of functions to TrueStudio.
Tab button can't alignment.
I try to google the shortcut for alignment in TrueStudio, but can't find it.
2018-09-19 05:43 AM
Hello Nickname3026,
Under Eclipse IDE (like SW4STM32 or TrueStudio) you should configure style formatter like this:
Window -> Preferences -> C/C++ -> Code Style -> Formatter
By default K&R profile is selected. With Tab size = 4 for indentation
You can create a new profile with your prefered settings.
Then if you want to indent correctly a source code, select all the file (CTRL+A) then right cliq and choose Source menu and Correct indentation (or directly with CTRL+I)
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-09-19 08:25 PM
Hello roman,
Your answer is what I required, many thanks.