I migrate current project from PHP 5.2 to 5.5 and would like to use short array syntax. There are >100 arrays in current file, see screenshort. It is time-consuming to click "Convert to short syntax" for each array. Yes, I can leave array as is for old codes and use a new syntax for new code. However, it would be nice if PhpStorm allow to convert all arrays to a new syntax in "one click" for whole opened file or for all files in project. Thanks.
Tried a few things with recording macros (under 'Edit') but couldn't find anything that worked real well.
Give that a go perhaps.
The closest thing to success (depending on how much code you have though) is to use F3 (find next) and alt+enter
So to run through a file it would be * cursor on the first 'array(' * alt+enter * enter * F3 * alt+enter * enter * F3 * alt+enter * enter * F3 ....
It would be nice if that could be recorded to a macro, but it didn't seam to work with 'Intentions' and I couldn't see a way to assign a keyboard shortcut to an intention.
wonder what that means.....
I migrate current project from PHP 5.2 to 5.5 and would like to use short array syntax. There are >100 arrays in current file, see screenshort. It is time-consuming to click "Convert to short syntax" for each array. Yes, I can leave array as is for old codes and use a new syntax for new code. However, it would be nice if PhpStorm allow to convert all arrays to a new syntax in "one click" for whole opened file or for all files in project. Thanks.
Tried a few things with recording macros (under 'Edit') but couldn't find anything that worked real well.
Give that a go perhaps.
The closest thing to success (depending on how much code you have though) is to use F3 (find next) and alt+enter
So to run through a file it would be
* cursor on the first 'array('
* alt+enter
* enter
* F3
* alt+enter
* enter
* F3
* alt+enter
* enter
* F3
....
It would be nice if that could be recorded to a macro, but it didn't seam to work with 'Intentions' and I couldn't see a way to assign a keyboard shortcut to an intention.
feature request http://youtrack.jetbrains.com/issue/WI-12831