unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: une <andrew.dunkin7424@fire.nsw.gov.au>
Subject: Formatting code text
Date: Sat, 18 Nov 2006 01:42:09 -0800 (PST)	[thread overview]
Message-ID: <7416552.post@talk.nabble.com> (raw)


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: http://www.nabble.com/Formatting-code-text-tf2658909.html#a7416552
Sent from the Emacs - Help mailing list archive at Nabble.com.

             reply	other threads:[~2006-11-18  9:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-18  9:42 une [this message]
2006-11-18 13:37 ` Formatting code text Perry Smith
     [not found] <mailman.786.1163845620.2155.help-gnu-emacs@gnu.org>
2006-11-19 19:34 ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7416552.post@talk.nabble.com \
    --to=andrew.dunkin7424@fire.nsw.gov.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).