User forums > Using Code::Blocks
SmartIndent + Whitesmith formatting
(1/1)
nightlight:
I have used C::B 10.5 until upgrading recently to 13.12 (Windows version). It seems that Smart/AutoIndent & Brace Smart Indent do not cooperate any more with Source Formatting, specifically with the Whitesmith format. This is how the sample is supposed to look like:
--- Code: ---int Foo(bool isBar)
{
if (isBar)
{
bar();
return 1;
}
else
{
return 0;
}
}
--- End code ---
In the old CB, as soon as the open brace was typed at indent +2, the closing brace would be appear right below it, with empty line & cursor ready for the block in between.
In the new version, typing the same way, the code ends up looking like this, as if forcing some other source formatting style:
--- Code: ---int Foo(bool isBar)
{
if (isBar)
{
bar();
return 1;
}
else
{
return 0;
}
}
--- End code ---
I tried various settings on Smart/AutoIndent, Brace SmartIndent and Source Formatting, but no luck. Has anyone found how to make SmartIndent & braces work for Whitesmith formatting?
nightlight:
The problem still persists in CB version 16.01 -- it just won't do Whitesmith source formatting while you type but only if you manually force reformat command of the file. It's unfortunate I "upgraded" from CB 10.5 which formatted in Whitesmith style as you type just fine.
oBFusCATed:
I get a reasonable behavior when I disable the smart indent option in the Settings -> Editor -> General.
Can you describe the problem with more details?
Navigation
[0] Message Index
Go to full version