0

Indentation of PHP 5.4 arrays with new square bracket notation

dan78 6 years ago • updated by Flavio De Stefano 5 years ago 1

Indentation of PHP 5.4 arrays with new square bracket notation

It would be helpful to change the auto-indentation settings for PHP files  such that the content of arrays with square bracket syntax is indented.


PHP code auto-indented with ST3 v 5054 looks like this:

For nested arrays this quickly becomes very hard to read. 


ST3 correctly indents traditional PHP arrays:



Any suggestions how to auto-indent square bracket arrays are welcome. 

Yes. I use everytime "reindent" commands, and it's really frustrating.