简体   繁体   English

从 Xcode 项目中删除空行

[英]Remove empty lines from Xcode project

I have a very long Xcode project it has many empty lines which make vey difficult for me to navigate through the project.Is there any short key to remove empty lines from selected code?我有一个很长的 Xcode 项目,它有很多空行,这让我很难在项目中导航。是否有任何快捷键可以从所选代码中删除空行?

 [inboxmessagesarray removeAllObjects];
    [checkimageArray removeAllObjects];


    NSMutableDictionary *callDict =[[NSMutableDictionary alloc] init];


    [callDict setObject:@"messages-getModuleMessages" forKey:@"call"];
    [callDict setObject:FB_API_KEY forKey:@"accessSecret"];
    NSString *x=[FBUserManager sharedUserManager].authToken;
    [callDict setObject:x forKey:@"authToken"];
    [callDict setObject:@"json" forKey:@"format"];

    [callDict setObject:@"archived" forKey:@"callType"];


    FBGenericWebHandler *handler = [[FBGenericWebHandler alloc] init];
    handler.delegate = self;
    [handler ArchivesMessages:callDict];
    handler = nil;
   [SVProgressHUD showWithStatus:@"Loading"];

You installed ClangFormat-Xcode plugin in your Xcode. 您在Xcode中安装了ClangFormat-Xcode插件。 remove Unnecessary space from code in your project. 从项目中的代码中删除不必要的空间。

Download : ClangFormat-Xcode 下载: ClangFormat-Xcode

See Below : 见下文 :

在此输入图像描述

Use regular expressions使用正则表达式

Replace: ^\s*$ With: (leave blank/nil)将 ^\s*$ 替换为:(留空/无)

And the current file will have all blank lines removed.并且当前文件将删除所有空行。

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

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