Array / Dictionary indentation with Xcode style

已完成

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

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

It works fine! Thank you!

0

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

0

请先登录再写评论。