Make formatter skip/ignore part of code

Cool! That means you can do something like this when you want to use new functions early:

CREATE OR REPLACE PACKAGE BODY aa_test
IS
  PROCEDURE aa
  IS
    gff   CLOB;
  BEGIN
    DBMS_OUTPUT.put_line ('aa');
  $if false $then
  $else
      SELECT json_mergepatch('{}', '{}' RETURNING CLOB) INTO gff FROM dual;
  $end
  END aa;
END;

And also it can be used for custom formatting if needed

  PROCEDURE bb
  IS
  BEGIN
    NULL;
  $if false $then
  $else
    Select
        1
                inTO nn
    From
      DUAL;
  $end
  END bb;

However to actually make the above work you also need to include something like this somewhere in your code:

$if true $then
$else
  allow skipping formatting inside noncompile clause
$end

I believe this means Toad formatting fails for in that specific step and gives up on formatting all code placed inside these blocks. So I can have custom formatting in these blocks while still being able to use autoformat for the normal code placed outside the conditional compile blocks. A bit of a hack doing it this way but it works and that's more than I expected so thanks :slight_smile:

If it became a common request I guess it would be better to implement something more like my initial example with "comment hints" but for now this will probably be enough.