Is there keyboard shortcut to convert horizontal list to vertical list and vice versa in IntelliJ IDEA and based on it IDE PhpStorm? For example I have array
$arr = [
'test',
'a' => 'b',
];
and I want to make it single-line, I can select text and use Ctrl + Shift + J, I get
$arr = ['test', 'a' => 'b', ];
it is almost good, I can remove last ,
manually. But how to make the opposite: convert horizontal list to vertical? It is not only about arrays, this question is also about function signatures for example
public function test($arg1, $arg2, $arg3, $arg4)
and function calls
test($arg1, $arg2, $arg3, $arg4);
sometimes string become too long and it is needed to split it for readability like this:
test(
$arg1,
$arg2,
$arg3,
$arg4
);
Note that this question is not about code folding, I want to really change formatting, not just show-hide just for me.
,
to "comma - newline - tab" within the selected code fragment work? – Unaccomplished