Toggle selected comma-separated list or html attributes between single line and multiline format

Is there a secret button to turn this:
const a = [1, 2, 3]
to that:
const a = [
    1,
    2,
    3,
]
and vice versa?

The same with this:
<div id="id" class="class" style="style"/>
and that:
<div
    id="id"
    class="class"
    style="style"
/>

0

Hi,

You may want to try hitting Alt+Enter (Opt+Enter on macOS) to invoke a quick-fix menu:

0

It doesn't work for me. No such items in the menus. Which settings should I check?




And something is present but only in php file, not vue.js

0

> It doesn't work for me. No such items in the menus.

What file type is this? I have checked it on .html and .vue files and it seems work. Please double-check that this intention is enabled:

0

No such items in Other



Maybe something wrong is with my system?

0

Thanks.

Basically, PhpStorm 2021.2.4 is a pretty old build already and I believe that these intentions were introduced later. Would it be possible to install the latest 2023.2.4 version instead?

0

Thank you very much.
I updated the system to 2023.2.4 , and there are those items mow.
But I am not happy yet.
Those items in the quick fix menu appear randomly.
When I want to split a group of elements, the system detects the parent group and shows only join command for that.
And sometimes it shows nothing or works only in one direction.
I think I should write my own plugin with Flora or Live plugins.

0

It works here.

But there is no opposite action.

Here I wanted to split the array, but it sees only parent level elements, mixins and props, and no props array:

0

Thanks!
I understand that these intentions do not always work and not available everywhere.

> I think I should write my own plugin with Flora or Live plugins.

In this case, I would suggest to submit bug reports/feature requests with test samples to our public tracker:
https://youtrack.jetbrains.com/newIssue

JS/HTML/CSS subsystems are maintained by the WebStorm team (WEB) whereas PhpStorm team (WI) is responsible for PHP. 

0

请先登录再写评论。