C code indentation

I and two other people are developing a code in C, and each one did their part of the code, but it got very "messy", is there any command for codeblocks, the IDE we are using, or some site that aligns the code automatically? Right now, grateful.

Author: Isac, 2017-12-06

2 answers

Indentation

You can indent in CodeBlocks by accessing:

Plugins > source code formatter(AStyle)

insert the description of the image here

Shortcuts

You can also associate a shortcut to the indentation by:

Settings > Editor > Keyboard shortcuts > source code formatter(AStyle)

Then in New Shortcut Set the shortcut you want and do Add

insert the description of the image here

Indentation Settings

It is even possible to configure the how the indentation is applied in:

Settings > Editor > Source formatter

insert the description of the image here

Either at the style level, indentation in tabs or spaces, keywords not to indent, etc...

 2
Author: Isac, 2017-12-06 20:31:33

Use Notpad++ using TextFX > TextFX Edit> Reindent C++ code.

Or use Sublime Text.

http://substanciando.blogspot.com.br/2014/02/indentacao-no-sublime-text.html
 -1
Author: Luiz Lanza, 2017-12-06 17:46:49