Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: mousefire on March 20, 2008, 09:23:02 am

Title: A problem about source code formation
Post by: mousefire on March 20, 2008, 09:23:02 am
after I type:
if(test>num)
and then the key "enter"
the editor can't auto indent to such formation:

if(test>num)
  code.....

I know After using the plugin "Astyle" the code can be changed to the formation I want, but how can I make it just as I like when I ented in the codes?
Title: Re: A problem about source code formation
Post by: Ceniza on March 20, 2008, 09:45:50 am
Code::Blocks only 'smart indents' when you add a { and press enter. It also 'smart unindents' when you add a }. Just another way to do it is with abbreviations (check Settings->Editor [Abbreviations]).
Title: Re: A problem about source code formation
Post by: mousefire on March 20, 2008, 09:52:36 am
Code::Blocks only 'smart indents' when you add a { and press enter. It also 'smart unindents' when you add a }. Just another way to do it is with abbreviations (check Settings->Editor [Abbreviations]).
Eh....Maybe I will always add a '{' after the key world if(),while(),for(;;)........
and,will the following editons of code::blocks solve it?
Title: Re: A problem about source code formation
Post by: Ceniza on March 20, 2008, 10:01:49 am
will the following editons of code::blocks solve it?

I don't know, but you can add a Feature request if you want here (http://developer.berlios.de/feature/?group_id=5358). You can also provide the patch here (http://developer.berlios.de/patch/?group_id=5358). (You must have a BerliOS account to do that)
Title: Re: A problem about source code formation
Post by: mousefire on March 20, 2008, 10:10:07 am
will the following editons of code::blocks solve it?

I don't know, but you can add a Feature request if you want here (http://developer.berlios.de/feature/?group_id=5358). You can also provide the patch here (http://developer.berlios.de/patch/?group_id=5358). (You must have a BerliOS account to do that)

Ok, thank you. I will add a Feature request.