PHP Storm keeps expanding collapsed code when re-opening files / IDE

I have a weird workflow where I collapse all methods I am not using so I can easily jump around to bits I am working on.

This works well for me, but ever since updating from PHPStorm 2017 to PHPStorm 2018 everytime I either close a file, or close the IDE and re-open the file / IDE every method has expanded again.

Does anyone know if this is an actual but, or a new setting or something?

I am running this on Windows 10.

Thanks

1

Hi there,

If file was closed when IDE session is over (project closed / IDE restarted) .. then any folding info for such closed files gets discarded (and defaults will be applied when opening it next time).

AFAIK it has always been like that (at very least that's my experience).

 

But folding should remain if file was closed and then reopened within the same session (at very least closing and then re-opening again works fine, even in latest 2018.1.6). Maybe some additional steps are needed (e.g. make big edits in other files and then save them .. or file gets modified externally etc, not sure)...

0
Avatar
Permanently deleted user

Ok interesting i was pretty sure it was not happening in the previous versions of PHP Storm.

thanks for coming back to me

0
Avatar
Permanently deleted user

I just tried to manually collapse some methods then close file and restart PhpStorm 2018.1.6 and open the file again - all collapsed regions remained.

Check Settings | Editor | General | Code Folding - what settings do you have for method body there?

0
Avatar
Permanently deleted user

Hi Vladimir,

 

Settings for Method bodies is unchecked at the moment.

I will try with it on and see if that helps.

ta

1
Avatar
Permanently deleted user

I have the same problem. Looks like a bug. (I'm using MacOS 10.11.6 and phpStorm 2018.2)

1

请先登录再写评论。