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.
You can use SwiftFormat to make indentation on all of your project .swift files
$ brew install swiftformat
$ cd <path to your project>
$ swiftformat .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With