I’m changing my coding style a bit, and would like to change a formatting pattern I used throughout a large project.
Within the implementation of a given method, I place an opening curly brace { one space after the last character in the method name. I’d like to find and replace each instance of this pattern with the opening brace on a new line–i.e.
- (void)myMethod:(id)aParameter
{
// Code
}
How can I achieve this?
One approach would be to use a code formatter, such as uncrustify. Of course, that will be a much larger change than your proposal. Very nice to have a program do the work for you in the long term.