In CodeWarrior I would enter a code such as:
if(foo){
cursor_here;
}
and the closing brace would be added automatically, with cursor placed at "cursor_here;" ready to enter the code block. With MCUxpresso I have searched forums and Guides but cannot get this to work the same. There is a setting for "Braces" but it is set on yet the editor still leaves the closing brace to be typed manually.
Small thing, but after 10 years of CW functioning like this, I am caught almost every time missing this as I code now in MCUx.
Is there a setting I am missing?
Cheers!
Solved! Go to Solution.
That is exactly how it works for me in MCUXpresso. It is standard Eclipse CDT behaviour in the C/C++ Editor. You must have changed a setting somewhere, to stop it working
That is exactly how it works for me in MCUXpresso. It is standard Eclipse CDT behaviour in the C/C++ Editor. You must have changed a setting somewhere, to stop it working
Thank you for verifying!
Turns out is was just a single source.c file that was acting this way. I believe I had made a mistake creating the file and added ".c" to it via "rename" after, then pasted in the old code from CodeWarrior I had. This one file acted like Java and would not provide closing braces, all 10 other source files were working correctly when I tested them. I renamed that one file to 'delete.me', created a new one with the desired name, correctly this time, and pasted code over, deleted the 'java-style' file and all is very well. Thank you again for your help!