Is there a macro or preference setting that would automatically align method parameters along the columns and colons in Xcode?
Basically a shortcut to turn this:
[object methodWithParam:theParam another:theOtherValue something:theSomethingValue else:theElseValue];
automatically into this:
[object methodWithParam:theParam
another:theOtherValue
something:theSomethingValue
else:theElseValue];
Is it possible to get this working with code completion? In other words when I tab complete a method it would automatically wrap the formatting into this style? And what about preexisting code? Can I put my caret inside a method, press a keyboard shortcut and auto format the parameters?
What I think you are trying to accomplish is turning the following
[object methodWithParam:theParam another:theOtherValue something:theSomethingValue else:theElseValue];
Into something more readable such as
[object methodWithParam:theParam
another:theOtherValue
something:theSomethingValue
else:theElseValue];
This can be accomplished by pressing the return key immediately before each pseudo-argument. For example, press return where <return>is shown.
[object methodWithParam:theParam <return>another:theOtherValue <return>something:theSomethingValue <return>else:theElseValue];
If executed properly, the colons should align.
[object methodWithParam:theParam<return>
another:theOtherValue<return>
something:theSomethingValue<return>
else:theElseValue];
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