Question

I prefer something that will work with Xcode 4, but I need a pretty print formatter for Objective-C code on the mac. I have tried Editor > Structure > Re-indent, but nothing happens (I have the code string selected beforehand). I am happy to use that if someone can tell me how to get it to work. The Preferences > Text Editing > Indentation is set to default settings, but I've tried changing these too.

So... I have looked all over but not found a tool to do this simple task for me. Text Wrangler says it will do it, but again nothing happens when I try to format the code.

May certainly be user error, but I need help - I'm tired of hand formatting the code!

Was it helpful?

Solution

Here's an example for Xcode 3. I don't have Xcode 4 so I can't test it there, but hopefully something similar will work. If not, you could create a service with Automator.

Also see these questions:

OTHER TIPS

Try Uncrustify tool. Works for me when I've got a bad formatted code =)

Also, have a look at this question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top