如何用clang格式格式化objective-c tow参数块?

时间:2016-01-31 06:14:51

标签: objective-c xcode clang-format

我有以下代码,例如:

[UIView animateWithDuration:10 animations:^{

} completion:^(BOOL finished) {

}]

当我对它应用clang-format时,它会变成:

[UIView animateWithDuration:10 animations:^{

}
    completion:^(BOOL finished){

    }];

如您所见,新行中的第二个块参数。

我的风格:

AlignTrailingComments: true
BasedOnStyle: Chromium
BreakBeforeBraces: Allman
ColumnLimit: 0
IndentWidth: 4
TabWidth: 8
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
ObjCBlockIndentWidth: 4
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
SpacesInSquareBrackets: false
SpacesInContainerLiterals: false
#SpaceInEmptyParentheses: true
SpacesInParentheses: false
UseTab: Never
KeepEmptyLinesAtTheStartOfBlocks: false
#SpaceAfterCStyleCast: true 

0 个答案:

没有答案