Similar questions have been asked before, but they didn't help me with what I'd like to do:
I want to re-format existing Objective-C code (several hundred files). For pure Apple-style formatting, uncrustify seems to do what I want. But for a few projects, I need a different style that I haven't found out how to configure uncrustify for. In this style, long method calls look like this (please refrain from discussing whether you like that style or not; do not suggest to use a different style):
[self
longMethod:arg1
withLots:arg2
ofArguments:arg3
aBlock:^{
[self doSomething];
}
andAnotherBlock:^{
[self doSomethingElse];
}
];
This wrapping is done when the method call would exceed a line length of 80 or 100 characters. Each line is indented by one level and contains exactly one argument and the selector part up to the corresponding :
. The lines thus are not colon-aligned.
No wrapping is done if the line length is below 80 or 100 characters:
[self shortMethod:withAnArgument];
Is there a code formatter that can be tweaked to support this style? If so, which and more importantly, how?