Code indentation in C-script Block

How can we indent the blocks of code in one go in c-script as it doesnt automatically do it?

There is not a mechanism to block-indent text within the C-Script block. At the moment, the C-Script is not so much meant as a code development environment but rather as a means to implement models that cannot be expressed easily (or at all) with block diagrams. Enhancing the C-Script block with more IDE-like functionality is on the development roadmap.

However, when writing C-Scripts myself I either a) copy/paste the code into a separate text editor, make any necessary formatting changes, and bring the modified code back into the PLECS environment or b) make use of external files (see a simple example here: https://forum.plexim.com/3211/include-paths-in-c-scripts)