4

如何在使用 uncrustify 调用 super 后添加换行符

当前的:

- (void)someFunction
{
   [super someFunction];
   more stuff;
   and more stuff;
}

期望:

- (void)someFunction
{
   [super someFunction];

   more stuff;
   and more stuff;
}

以及如何在接口声明和实现声明之前和之后添加换行符

当前的:

@interface SCLoginScreenViewController ()
@property (weak, nonatomic) IBOutlet UIView *someView;
@property (weak, nonatomic) IBOutlet UIView *anotherView;
@end
@implementation SCLoginScreenViewController
- (void)someFunction
{
}

期望:

@interface SCLoginScreenViewController ()

@property (weak, nonatomic) IBOutlet UIView *someView;
@property (weak, nonatomic) IBOutlet UIView *anotherView;

@end

@implementation SCLoginScreenViewController

- (void)someFunction
{
}
  • 我正在使用 BBUncrustifyPlugin 和 UncrustifyX
4

1 回答 1

0

不幸的是,Uncrustify 目前不支持任何这些功能。1

下面显示的唯一“新行之后”选项。

(屏幕截图中未包括的两个是:Newline count after variable definition blockNewline count after variable definition block not at the top of a function body

在此处输入图像描述

“换行符”部分还有其他一些选项。但同样,它们都不符合您的情况:

Newline after while截图中缺失)

在此处输入图像描述 在此处输入图像描述


1.我用的是version2.1.1,相信是最新的

于 2015-08-14T14:12:51.753 回答