This request may seem a bit "nit-picky", but it's a source of annoyance to me, so I thought I would ask about it. I'm putting it in Feature Requests instead of Bugs because it looks as if it's something that is just missing, rather than not working as expected. Anyway, here's the scenario:
Let's say I have some PHP code that I want to "pretty up" by using the "Format PHP Code..." feature in the PHP menu. Let's also say that I have the following code:
- Code: Select all
if (!isset($foo)) continue;
This is what I consider to be an "atomic" (one line) IF block. It's self-contained, and as such is most readable if it remains on ine line (just my opinion, but...). However, if I format my PHP code using the "Format PHP Code..." selection in the PHP menu, the code ends up looking like this:
- Code: Select all
if (!isset($foo))
continue;
Not what I was wanting... now there are a ton of options presented to me when I go to format my code (spacing, indentation, where to add newlines, etc.), but none of the options at my disposal have any effect on the behavior described above. In the options there is a checkbox for adding a "break before {" (New lines tab, 3rd option), so how hard would it be to add an option for "Break after )", or {better} something like "Don't break atomic IF blocks"? Just wondering.