V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Magician
V2EX  ›  程序员

PhpStorm 代码对齐 怎么弄的 ?

  •  
  •   Magician · 2016-03-14 21:44:54 +08:00 · 4331 次点击
    这是一个创建于 2965 天前的主题,其中的信息可能已经有所发展或是发生改变。

    $assign['self_cnt'] = $self_order;
    $assign['third_cnt'] = $third_order;
    $assign['formget'] = $formget;

    $assign['self_cnt'] = $self_order;
    $assign['third_cnt'] = $third_order;
    $assign['formget'] = $formget;

    上面的如何弄成下面的 强迫症患者
    
    10 条回复    2016-03-15 17:03:13 +08:00
    feiyuanqiu
        2
    feiyuanqiu  
       2016-03-14 21:58:37 +08:00
    settings->editor->code style->php->wrapping and braces->assignment statement->align consecutive assignments

    我觉得这种对齐其实不太好,遇到一个特别长的变量名整个格式就显得很奇怪
    Kilerd
        3
    Kilerd  
       2016-03-14 23:16:07 +08:00
    按照 PEP8 ,我保证不打死你。 噢,对了,我用 Python 的
    Magician
        4
    Magician  
    OP
       2016-03-14 23:24:33 +08:00
    @feiyuanqiu 谢谢啦 弄好了
    cxbig
        5
    cxbig  
       2016-03-14 23:43:25 +08:00
    建议用内置的 PSR 标准
    jsonline
        6
    jsonline  
       2016-03-15 09:16:56 +08:00 via Android
    对齐好无聊
    motecshine
        7
    motecshine  
       2016-03-15 09:33:45 +08:00 via Android
    培训机构出来的吧, 5.4 数组有新特性,建议让你们老师看看
    micookie
        8
    micookie  
       2016-03-15 10:26:45 +08:00
    为什么我没有看出来上边和下边的区别
    bigwahaha
        9
    bigwahaha  
       2016-03-15 17:02:49 +08:00
    为什么我没有看出来上边和下边的区别
    bigwahaha
        10
    bigwahaha  
       2016-03-15 17:03:13 +08:00
    为什么我也没有看出来上边和下边的区别
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2866 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 03:17 · PVG 11:17 · LAX 20:17 · JFK 23:17
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.