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

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏