Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XCode C/C++ auto-indent



Could someone please help me with code indenting?

I have the auto-insert '}' option enabled, and it's
quite nice the way it puts a closing bracket in for
you. It's not so good when you ad a second opening
brace however, as it messes up the indentation. This
what I get after inserting the second brace:

void dummy_function (void)
{
        for (int i=0; i<99; i++)
                {
                
                }
}

Which has to be manually undone. Does anyone else have
this problem?

My second-choice would be to automatically indent on a
return after an opening brace, and to un-indent on a
return after a close. However, if I enable '{', '}'
and Return as  Auto-Indent Characters, I get the same
result.

Even the Format -> Re-Indent option produces this
result on highlighted text blocks.

How can I get the braces to line up vertically with
the for statement?

Thanks.

Send instant messages to your online friends http://uk.messenger.yahoo.com 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.