Code::Blocks Forums

User forums => Help => Topic started by: kissjhy on July 15, 2012, 04:44:26 pm

Title: cb can't auto indent if i don't use brace("{}")?
Post by: kissjhy on July 15, 2012, 04:44:26 pm
for example
Code
if (a!=b)
a++;
cant auto indent.
Code
if (a!=b)
{
    a++;
}
can auto indent.

I write "if (a!=0)"  then press "enter",it won't auto indent if I don't press a "{".
how could I solve this problem.

Title: Re: cb can't auto indent if i don't use brace("{}")?
Post by: Jenna on July 16, 2012, 12:45:07 am
Not very much information about your version of C::B, so no meaningful answer can be given.

But what I can tell you, it works fine with a recent nightly (8133 on my fedora system).

What are your "Indent options" in "Settings -> Editor -> General settings" ?
Title: Re: cb can't auto indent if i don't use brace("{}")?
Post by: kissjhy on July 16, 2012, 04:47:37 am
Thinks a lot.
I download a nightly(8086) and it works well.
By the way, where can I find the 8133?
Title: Re: cb can't auto indent if i don't use brace("{}")?
Post by: Jenna on July 16, 2012, 06:54:50 am
I download a nightly(8086) and it works well.
By the way, where can I find the 8133?
Depends on your system.
For Fedora 15 to 17 and RedHat/CentOS 6 in my repo, for RedHat/CentOS 5 and Debian/Ubuntu it will be in my repo during the day.
All other platform OSes: depends on the repo-maintainer.