I am trying to use "indent" program to indent C++ programs. But it does not seem to work fine. It is messing up the indentation much more.
It is a Class file. Can you please suggest the right options for it or another program that works?
Thanks
I am trying to use "indent" program to indent C++ programs. But it does not seem to work fine. It is messing up the indentation much more.
It is a Class file. Can you please suggest the right options for it or another program that works?
Thanks
Try Artistic Style:
Artistic Style is a source code indenter, formatter, and beautifier for the C, C++, C# and Java programming languages.
in visual studio, ctrl+a, ctrl+k, ctrl+f will auto-indent the entire file you're working in.
Many editors like Vim and Emacs have a feature that reindents code according to its built-in indentation standard.
In Vim, you can type =
with any motion. (Like =%
at any block delimiter or <shift-V>
to select a region and then =
to reformat.)
bcpp, available in any linux distro (and probably for mingw/cygwin, but I have not checked it) is a C++ indenter and beautifier. You can parametrize how it works with the code.