News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

A problem about source code formation

Started by mousefire, March 20, 2008, 09:23:02 AM

Previous topic - Next topic

mousefire

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?

Ceniza

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]).

mousefire

Quote from: 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]).
Eh....Maybe I will always add a '{' after the key world if(),while(),for(;;)........
and,will the following editons of code::blocks solve it?

Ceniza

Quote from: mousefire on March 20, 2008, 09:52:36 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. You can also provide the patch here. (You must have a BerliOS account to do that)

mousefire

Quote from: Ceniza on March 20, 2008, 10:01:49 AM
Quote from: mousefire on March 20, 2008, 09:52:36 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. You can also provide the patch here. (You must have a BerliOS account to do that)

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