Re: Newbie questions about XCode
Re: Newbie questions about XCode
- Subject: Re: Newbie questions about XCode
- From: Jean-Daniel Dupas <email@hidden>
- Date: Wed, 3 Feb 2010 12:45:24 +0100
Le 3 févr. 2010 à 12:32, Roland King a écrit :
well there's a re-indent feature, but I'd like more myself. I'd like to be able to set up my own rules for brackets and braces and spaces and be able to reindent and reformat a block of code with those features in. That's particularly so because where XCode templates out
if ([[object foo] bar] ){
action
}
which separates the opening ( from the if, squashes [ up against the object and puts the opening brace on the same line, I change it to
if( [ [ object foo ] bar ] )
{
action
}
and that gets old really fast when you start as many new projects as I do. yes I could edit the templates but I did that once and then a new version of XCode came out with new templates and I didn't feel like doing it all over again.
And an other option would be to change default formatting settings. See XCCodeSenseFormattingOptions in Xcode User Default Reference. http://developer.apple.com/mac/library/documentation/DeveloperTools/Reference/XcodeUserDefaultRef/100-Xcode_User_Defaults/UserDefaultRef.html#//apple_ref/doc/uid/TP40005535-CH3-SW40
That doesn't help with templated code as when you create a new project, that comes right out of the Class.h etc files in the library with the formatting it had on it when it was typed in. As far as I know the only reformatter there is (reindent) just reindents, it doesn't retroactively go and reapply those formatting rules. If it did, I'd be happy.
You're right, it does not apply to templates, but at least it works for text macros. It's useful if you use them to generate conditional block, loops or method skull (like dealloc).
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden