简体   繁体   English

Uncrustify obj-c:调用super,interface声明和实现声明之前和之后的换行符

[英]Uncrustify obj-c: Newline before and after call to super, interface declaration and implementation declaration

How can I add newline after call to super with uncrustify 如何在使用uncrustify调用super之后添加换行符

Current: 当前:

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

Desired: 期望:

- (void)someFunction
{
   [super someFunction];

   more stuff;
   and more stuff;
}

And how can I add newline before and after interface declaration and implementation declaration 如何在界面声明和实现声明之前和之后添加换行符

Current: 当前:

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

Desired: 期望:

@interface SCLoginScreenViewController ()

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

@end

@implementation SCLoginScreenViewController

- (void)someFunction
{
}
  • I am using BBUncrustifyPlugin and UncrustifyX 我正在使用BBUncrustifyPlugin和UncrustifyX

Unfortunately Uncrustify doesn't support any of these features at the moment. 不幸的是,Uncrustify目前不支持任何这些功能。 1 1

The only "new line after" options that are shown below. 唯一的“新行后”选项如下所示。

(Two not included in the screenshot are: Newline count after variable definition block and Newline count after variable definition block not at the top of a function body ) (两个未包含在屏幕截图中的是: Newline count after variable definition block Newline count after variable definition block not at the top of a function bodyNewline count after variable definition block not at the top of a function body

在此输入图像描述

There are some other options in the "newlines" section. “换行”部分还有其他一些选项。 But again, none of them match your case: 但同样,它们都不符合你的情况:

( Newline after while missing from screenshots) (截屏Newline after while遗漏的新线)

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


1. I'm using version2.1.1, I believe this is the latest 1. 我使用的是版本2.1.1,我相信这是最新版本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM