V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zhangwei1996
V2EX  ›  问与答

PHPstorm 9.0.2 在哪设置 HereDoc 的格式?

  •  
  •   zhangwei1996 · Nov 9, 2015 · 1587 views
    This topic created in 3822 days ago, the information mentioned may be changed or developed.

    格式化的时候想这样:

    $heredoc = <<< HEREDOC_ID
    some $contents
    HEREDOC_ID;
    

    但是现在格式化以后是这样:

    $heredoc 
         = <<< HEREDOC_ID
    some $contents
    HEREDOC_ID;
    

    请问在哪里设置呢? Editor->Code&style->PHP 找了很久都没有找到呢!

    5 replies    2015-11-09 16:26:44 +08:00
    zhangwei1996
        1
    zhangwei1996  
    OP
       Nov 9, 2015
    where setting "heredoc format style" in phpstorm 9.0.2

    I hope like this :

    ```
    $heredoc = <<< HEREDOC_ID
    some $contents
    HEREDOC_ID;
    ```


    but now , After formatting like this :

    ```
    $heredoc
    = <<< HEREDOC_ID
    some $contents
    HEREDOC_ID;
    ```


    Where can I set it? `Editor->Code&style->PHP` for a long time did not find
    zhangwei1996
        2
    zhangwei1996  
    OP
       Nov 9, 2015
    linauror
        3
    linauror  
       Nov 9, 2015
    File-Settings
    搜索框直接输入 heredoc 回车
    Colors & Fonts - PHP
    点进去就是
    zhangwei1996
        4
    zhangwei1996  
    OP
       Nov 9, 2015
    @linauror 搜,只有 color 设置
    cxbig
        5
    cxbig  
       Nov 9, 2015
    HereDoc 从第二行开始必须顶格写。 reformat 是对的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1136 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 23:05 · PVG 07:05 · LAX 16:05 · JFK 19:05
    ♥ Do have faith in what you're doing.