[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Formatting code text

From: une
Subject: Formatting code text
Date: Sat, 18 Nov 2006 01:42:09 -0800 (PST)

When writing code in C++ or Java I notice that I can get the code all nicley
aligned and indented correctly by simply adding a comment at the end of each
line of code. As you enter the //, the line of code moves to its correct
alignment. What I have been doing is writing my code and periodically
tidying it up by adding // at the end of every line of code. My question is,
can I speed this aligning and indenting process up by formatting the entire
file using one command? Emacs obviously knows how much each line should be
indented, but doing it one line at a time by adding // is laborious.
PS - I did not mean to cross post, my first post was in the Gnu Emacs forum.
Not sure how this website works yet. Sorry.
View this message in context:
Sent from the Emacs - Help mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]