Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: atulshanbhag on August 01, 2015, 08:44:31 AM

Title: indentation for class and function
Post by: atulshanbhag on August 01, 2015, 08:44:31 AM
Is there any way to indent function and classes like this ->

data-type function() {
    ....
    ....
    ....
}


Instead of
data-type function()
{
    ....
    ....
    ....
}


It doesn't make an empty line to type in code when I use newline after opening brace
Title: Re: indentation for class and function
Post by: marcelinux on August 01, 2015, 02:46:52 PM
Maybe Astyle plugin can help you.
http://www.codeblocks.org/docs/main_codeblocks_en3.html#x3-460002.1
Title: Re: indentation for class and function
Post by: atulshanbhag on August 01, 2015, 09:13:30 PM
That indents all right but not while actually coding. When i create say 'void function() { ' and press enter i get a '}' but on immediate next line where i cannot type. this does not happen for if/else and while/for
Title: Re: indentation for class and function
Post by: oBFusCATed on August 02, 2015, 10:40:38 AM
So you want to type { and cb to output the } on the next line?
Title: Re: indentation for class and function
Post by: ouch on August 03, 2015, 11:19:21 PM
Have you looked at the abbreviations plugin? You can create your own to do that and more. (settings->editor->abbreviations)