• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Newbie questions about XCode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie questions about XCode


  • Subject: Re: Newbie questions about XCode
  • From: Roland King <email@hidden>
  • Date: Wed, 3 Feb 2010 19:32:45 +0800





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. 
 _______________________________________________
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

  • Follow-Ups:
    • Re: Newbie questions about XCode
      • From: Jean-Daniel Dupas <email@hidden>
References: 
 >Newbie questions about XCode (From: Johan Lund <email@hidden>)
 >Re: Newbie questions about XCode (From: Roland King <email@hidden>)
 >Re: Newbie questions about XCode (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Newbie questions about XCode
  • Next by Date: Re: Newbie questions about XCode
  • Previous by thread: Re: Newbie questions about XCode
  • Next by thread: Re: Newbie questions about XCode
  • Index(es):
    • Date
    • Thread