Skip to content

Xcode behavior regarding indenting block #76

@igor9silva

Description

@igor9silva

Does anyone know how to make Xcode auto-indent blocks correctly?

What I mean is that, according to this guide and to what I think is a much cleaner and readable code, blocks should be indented like the following:

Preferred:

// blocks are easily readable
[UIView animateWithDuration:1.0 animations:^{
  // something
} completion:^(BOOL finished) {
  // something
}];

Not Preferred:

// colon-aligning makes the block indentation hard to read
[UIView animateWithDuration:1.0
                 animations:^{
                     // something
                 }
                 completion:^(BOOL finished) {
                     // something
                 }];

But Xcode keeps wrongly indenting the inside-block code every semi-colon I type!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions