Objective-C Tidy

后端 未结 8 2071
無奈伤痛
無奈伤痛 2020-12-08 08:17

I have a somewhat messily-formatted Objective-C code base. Is there a way to have Xcode reformat an entire project to conform to a coding standard (i.e., properly indent, sp

相关标签:
8条回答
  • 2020-12-08 09:15

    From Xcode:

    1) Change the Indentation preferences to match what you want.

    2) Select a file to work on and Select All (cmd-A)

    3) Shift Left (cmd-[) several times until all lines are at the left edge of the window.

    4) Use Re-Indent Selection (from Edit->Format-> or from the right-click contextual menu)

    Only works on one file at a time, not the whole project. Also only deals with indentation.

    0 讨论(0)
  • 2020-12-08 09:15

    The newest, bestest way of doing this, as of this writing, is SpaceCommander. It's based on top of clang, and has lots of other neat features, and is maintained and active as of this writing.

    0 讨论(0)
提交回复
热议问题