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' => '检测报告'
);
有没有快捷键或者快捷的方式?
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:
Change to Chop down if long
Checked Align when multiline
Checked New line after '('
Checked Place ')' on new line