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?

0
3 comments
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

It works fine! Thank you!

0
Avatar
Permanently deleted user

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.