QP5 v5.336 formatter does not respect the right margin

In Toad 13.1 (QP5 v5.336 formatter), formatted SQL extends past the Right Margin value quite a bit. More so than in previous formatter versions.

My preference would be to have an option where the right margin could be specified as

  1. strictly enforced,
  2. loosely enforced
  3. not at all

I understand that the margin can be changed in options. I would like to be able to strictly enforce the margin.

Is it possible to post an example?

Of course you can specify “not at all” by setting the margin to say 999.
I admit that these days the margin setting has become a hint rather than an enforcement due to gradual change in development culture. Some 30+ years ago everything was listed out using fixed width matrix printers which truncated everything beyond the available 80/132/158 or other line size, today I don’t remember the day anymore that I printed code, and in addition windows have horizontally scrolling.

I mean: are there scenarios where strict enforcement is really mandatory? Of course, a selected width of say 90 should not result in text found at column 150, but coding to enforce 90 in all cases will be a pain, especially in the presence of long identifiers and/or deep block nesting. Sometimes violating the margin is unavoidable. In such cases, what then could be considered is some form of text wrapping with the wrapped text right-aligned to keep all related words visually close together.

Please convince me. :slight_smile:
Andre

1 Like

I like this idea. I also realize it would be extremely difficult to “strictly enforce” the right margin but I agree it seems like it could be enforced more than it is. Maybe more stacking and aligned right options???