Menu

#165 Indent of anonymous function or procedure

None
closed-fixed
5
2026-02-14
2023-02-23
No

Is it possible to indent the anonymous function or procedure to be in line with the begin/end

1 Attachments

Discussion

  • Thomas Mueller

    Thomas Mueller - 2023-02-26

    I don't think so, but I haven't actually tried all applicable settings.

     
  • Flavius Fernandes

    It would be if it could be done. Below is the example, and the second is what it could be like. The begin in the OnTest does not line up with the function name.

    procedure  TProc.DoSomething;
    begin
        TMethod.OnTest  :=
              function: TXxx
          begin
           ...
          end;
      end;
    

    should be like this

    procedure  TProc.DoSomething;
    begin
        TMethod.OnTest  :=
             function: TXxx
              begin
               ...
              end;
      end;
    
     

    Last edit: Thomas Mueller 2025-05-05
  • Nashev

    Nashev - 2024-11-21

    But I would like to have formatting like this:

    procedure TProc.DoSomething;
    begin
      TMethod.OnTest :=
          function: TXxx
          begin
            ...
          end;
    end;
    
    // and this:
    procedure TProc.DoSomething;
    begin
      TMethod.OnTest := function: TXxx begin
        ...
      end;
    end;
    

    So maybe a configuration option could be added.

     

    Last edit: Thomas Mueller 2025-05-05
  • Thomas Mueller

    Thomas Mueller - 2026-02-14
    • labels: FIF --> FIF, formatter
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,2 @@
     Is it possible to indent the anonymous function or procedure to be in line with the begin/end
    +![](/p/gexperts/feature-requests/165/attachment/1.png)
    
     
  • Thomas Mueller

    Thomas Mueller - 2026-02-14
    • status: open --> closed-fixed
    • assigned_to: Thomas Mueller
     
  • Thomas Mueller

    Thomas Mueller - 2026-02-14

    This was a bug and has been fixed in revision #5117

     

Log in to post a comment.

MongoDB Logo MongoDB