开发者

objective-c source code formatter [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

Improve this question

I prefer something that will work with Xcode 4, but I need a pretty print formatter for Obj开发者_开发知识库ective-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!


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

Also, have a look at this question.


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:

  • Objective-C Tidy
  • Is there a version of GNU indent which supports Objective C?
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜