Question

There are so many settings in the preferences for Code->Style->Objective-C. I'm looking for the right one to reformat this line of code

SCPropertyDefinition *test = [SCPropertyDefinition definitionWithName:@"created_at" title:@"Tweeted At" type:SCPropertyTypeLabel];

to this format

SCPropertyDefinition *test = [SCPropertyDefinition definitionWithName:@"created_at" 
                                                                title:@"Tweeted At" 
                                                                 type:SCPropertyTypeLabel];

(the point is to have the colons indention matching)

I guess the it should be in the Wrapping and Braces Tab, but I havn't found the right setting yet. Thanks for your ideas.

Was it helpful?

Solution

The setting you are looking for is Wrapping and Braces | Method call arguments set to Chop down if long with enabled Align by colon. Note that there are separate settings for Method parameters.

OTHER TIPS

It seems like as of App Code 2017.1 (perhaps earlier too) the align by colon option is not available in Swift. You can still tell App Code to chop a long argument/parameter list:

How to find the chop long line dialog

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top