Xcode Comment Alignment

I finally put my finger on something that’s been bugging me about Xcode’s comment indentation since forever.

For short comments, I typically use //:

// This is a
// short comment.

That’s fine unless comments grow long:

// Lengthy essay
// about the high-level
// overview of the code
// perhaps with parameter-level
// machine-readable API documentation.

Having to prefix each of my lines with an // gets on my nerves, so I switch to classic C comment style:

/*
Lengthy essay
about the high-level
overview of the code
perhaps with parameter-level
machine-readable API documentation.
*/

However, Xcode wants to format it like this:

/*
 Lengthy essay
 about the high-level
 overview of the code
 perhaps with parameter-level
 machine-readable API documentation.
 */

Note each line after the initial comment opening is prefixed by one space.

I think this is because Xcode wants to help you line up the asterisks, like so:

/*
 * Lengthy essay
 * about the high-level
 * overview of the code
 * perhaps with parameter-level
 * machine-readable API documentation.
 */

However the entire reason I use classic C comments is when I don’t want to have to bother with per-line prefixes.

For now I just manually delete the extraneous spaces, but I wish I could easily suppress this behavior.

xcode Nov 28 2012