xcodeindentationauto-indentappcode

Fix indentation for entire project in Xcode 7?


I've inherited a huge iOS project which is all using two-space indenting. I need that to be four-space indenting. I know that I can hit Ctrl+I per file, but I'm wondering whether Xcode (or AppCode, for that matter) has a means of re-indenting every source file in the entire project in one whack.

Failing that, I’m wondering how I might go about writing some sort of script (using Automator, or perhaps an Xcode plugin, or even something on the command line) to achieve this without going insane.


Solution

  • So, I did manage this with AppCode in the end. We ended up doing a wider-scale refactor using AppCode’s various tools. I’m not sure if I would’ve been able to do JUST the spacing, their Twitter support suggested that I could, but didn’t detail exactly how.