phpstorm 数组换行显示

phpstorm 数组怎么换行显示?
格式化之后代码是这样的:
`$ac_arr = array('list' => '车源列表',

'add' => '添加车源', 'edit' => '编辑车源', 'del' => '删除车源', 'sell' => '改变买卖状态', 'show' => '显示车源', 'refresh' => '刷新车源', 'html' => '生成静态', 'bulkhtml' => '批量生成静态', 'bulkdel' => '批量删除', 'bulkrefresh' => '批量刷新', 'bulksell' => '批量改变买卖状态', 'report' => '检测报告');`

怎么让它显示成这样的代码:

$ac_arr = array(
    'list' => '车源列表',
    'add' => '添加车源', 
    'edit' => '编辑车源', 
    'del' => '删除车源', 
    'sell' => '改变买卖状态', 
    'show' => '显示车源', 
    'refresh' => '刷新车源', 
    'html' => '生成静态', 
    'bulkhtml' => '批量生成静态', 
    'bulkdel' => '批量删除', 
    'bulkrefresh' => '批量刷新', 
    'bulksell' => '批量改变买卖状态', 
    'report' => '检测报告'
);

有没有快捷键或者快捷的方式?

阅读 5.4k
1 个回答

Preferences

Editor > Code Style > Wrapping and Braces > Array
Initializer Option was [do not wrap].
For that reformat code was not working as expected.

Do it:

  1. Change to Chop down if long

  2. Checked Align when multiline

  3. Checked New line after '('

  4. Checked Place ')' on new line

宣传栏