Is there a SIMPLE way to format nano file text? My code is getting pretty messy, so it MAY help to format it.

closed as unclear what you're asking by Jeff Schaller, countermode, Archemar, icarus, Thomas Sep 1 '18 at 6:42

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    I believe you're trying to remember indent – Jeff Schaller Aug 30 '18 at 14:47
  • I adjusted the title on the assumption that you're looking to format C code (within nano), and not, say English prose or Fortran code. – Jeff Schaller Aug 30 '18 at 14:55
  • 1
    Perhaps this astyle was the artistic program you were thinking of? – Jeff Schaller Aug 30 '18 at 14:55
  • Sometime second guessing the poster in not a good idea.You are forgiven, but to avoid more WRONG replies - can you delete the "for C code" even when nano is a text editor , not a C code editor in my case. – user238756 Aug 30 '18 at 15:23
  • I was distracted, then, by your last sentence: "There is an app ... to format C code". Is formatting C code not your intention? – Jeff Schaller Aug 30 '18 at 15:30

There is also clang-format command


For formatting / "beautifying" C code, you have the packages in Debian, astyle, bcpp and uncrustify

For searching the packages:

$ apt-cache search beautifier | grep C
astyle - Source code indenter for C, C++, Objective-C, C#, and Java
bcpp - C(++) beautifier
bcpp-dbg - C(++) beautifier - debug
uncrustify - C, C++, C#, D, Java and Pawn source code beautifier