V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
mhtt
V2EX  ›  问与答

寻求 xcode 下代码格式工具

  •  
  •   mhtt · 2016-05-04 09:32:23 +08:00 · 1027 次点击
    这是一个创建于 2973 天前的主题,其中的信息可能已经有所发展或是发生改变。

    xcode 创建的文件,花括号都是在上面的,比如

    - (void)viewDidLoad {
    }
    
    //条件
    if(xxx){
    }
    else {
    }
    

    我也这样使用着,但最近喜欢下面的格式

    if(xxx)
    {
    }
    else
    {
    }
    

    那么问题来了,有没有办法把已经写好的代码格式化下呢?

    2 条回复    2016-05-04 10:29:35 +08:00
    joeytat
        1
    joeytat  
       2016-05-04 09:49:29 +08:00
    BBUncrustifyPlugin
    typcn
        2
    typcn  
       2016-05-04 10:29:35 +08:00
    clang-format
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2971 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 12:33 · PVG 20:33 · LAX 05:33 · JFK 08:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.