3
我有以下代碼:Xcode與uncrustify:如何將函數聲明與冒號對齊?
@interface TRYoutubeManager : AFHTTPRequestOperationManager
- (void)getVideosForDefaultChannelsWithSuccess:(void (^)(NSArray *youtubeVideosArray))successBlock failure:(void (^)(NSError *error))failureBlock;
@end
所以我想保留120個字符行限制。並調整宣言冒號,就像這樣:
@interface TRYoutubeManager : AFHTTPRequestOperationManager
- (void)getVideosForDefaultChannelsWithSuccess:(void (^)(NSArray *youtubeVideosArray))successBlock
failure:(void (^)(NSError *error))failureBlock;
@end
但是,當我在它應用Uncrustify,我得到:
@interface TRYoutubeManager : AFHTTPRequestOperationManager
- (void)getVideosForDefaultChannelsWithSuccess:(void (^)(NSArray *youtubeVideosArray))successBlock failure:(void (^)(
NSError *
error))
failureBlock;
@end
插件戰利品整個事情。甚至超過了線路限制。 這一些關鍵(我猜)PARAMS:
# Align ObjC declaration params on colon
align_oc_decl_colon = true #
# Alignment span for ObjC message colons
align_oc_msg_colon_span = 20 # number
# Alignment span for ObjC message spec
align_oc_msg_spec_span = 0 # number
# Code width
code_width = 120 # number
整個配置文件HERE
請幫我設置Uncrustify配置correclty。
是的,看起來像Uncrustify不會將參數移動到新行。畢竟,我最終使用了Clang-Format + Xcode語法重新縮進BBUncrustifyPlugin。以更可預測的方式工作。 – orkenstein 2015-01-10 09:04:17