To install this package, run in Emacs:
M-x package-install RET gnu-indent RET
Keeping code correctly indented can be tedious. And when the project is
large, maintaining a consistent style everywhere by hand can become almost
impossible. gnu-indent
solves this problem by doing the job itself.
Enable gnu-indent-mode
and continue with the your editing; your file will
be reindented by GNU Indent just before saving it maintaining the position
of point.
GNU Indent supports C, C++ is also partially supported.
gnu-indent-mode
gnu-indent-buffer
gnu-indent-region
gnu-indent-program
"indent"
).gnu-indent-options
nil
).
See GNU Indent manual (C-h i m Indent RET
on Emacs, info indent
on
shell) for available options.