Array / Dictionary indentation with Xcode style

Completed

I want to write code for array, dictionary, etc. like this.

NSArray *hello = @[@1,
                   @2,
                   @3
                  ];

or

NSArray *hello = @[
                   @1,
                   @2,
                   @3
                  ];

Probably this is a default indentation of Xcode.
But in AppCode, I got this when I formatted it.

NSArray *hello = @[@1,
    @2,
    @3
];

How should I change my formatter setting? Or should I send a feature request about this to YouTrack?

3 comments

Hi,

This formatter setting is controlled via Editor -> Code Style -> C/C++/Objective-C -> Wrapping and Braces -> Collection literals and initializer lists -> Align when multiline. Try to enable the option and see if it helps.

1

Hello, I want the opposite: show AppCode indent style in Xcode, do you know how can I get it?

0

Please sign in to leave a comment.