0

I Eclipse there is a shortcut to apply format which is:

Cmd + Shift + F

Is there a similar shortcut in Xcode which fixes the formats like tabs, etc.?

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
Michael
  • 32,527
  • 49
  • 210
  • 370
  • 1
    possible duplicate of [XCode 4; How to format code?](http://stackoverflow.com/questions/6543026/xcode-4-how-to-format-code) - same still applies for XCode 6. – l'L'l Mar 16 '15 at 16:12

1 Answers1

1

You probably want Editor -> Structure -> Re-Indent (Ctrl+i). I does not change the position of braces and things like that. For that, you'd need to use an external code formatting tool like Uncrustify.

DarkDust
  • 90,870
  • 19
  • 190
  • 224
  • `clang-format` is better still. There is a [plugin](https://github.com/travisjeffery/ClangFormat-Xcode) for Xcode. – trojanfoe Mar 16 '15 at 16:09