Rapid PHP -> Format PHP -> Keep atomic IF on one line

Let us know what you would like to see in the next version of this software

Moderator: kfury77

Forum rules
Please follow these guidelines when posting feature requests. This will help to increase the value of your contribution.

  • Do not create new topics for already requested features. Add your comments to the existing feature request topics instead;
  • Create separate topic for each feature suggestion. Do NOT post a number of non-related feature suggestions in a single topic;
  • Give your topic a meaningful title. Do NOT create topics with meaningless titles, such as "My Suggestion" or "My Problem".

Please note that we DO READ all suggestions, even if a reply is not posted. Thanks!

Rapid PHP -> Format PHP -> Keep atomic IF on one line

Postby DaveMorton » Fri May 20, 2016 11:28 pm

Hello, all! :)

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.
DaveMorton
 
Posts: 28
Joined: Thu Apr 11, 2013 9:25 pm

Re: Rapid PHP -> Format PHP -> Keep atomic IF on one line

Postby Aivars » Sun May 29, 2016 3:53 pm

I'll add this to feature suggestions. We want to revamp the formatter soon, so it's a good timing for suggestions like this.
Blumentals Software Programmer
User avatar
Aivars
Blumentals Software Developer
 
Posts: 2453
Joined: Thu Aug 22, 2002 1:40 pm
Location: Latvia

Re: Rapid PHP -> Format PHP -> Keep atomic IF on one line

Postby DaveMorton » Sun May 29, 2016 4:22 pm

Thanks, Aivars. I appreciate it. :)
DaveMorton
 
Posts: 28
Joined: Thu Apr 11, 2013 9:25 pm


Return to HTMLPad / Rapid CSS / Rapid PHP / WeBuilder Feature Requests

Who is online

Users browsing this forum: No registered users and 11 guests