Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-04

Code formatting help needed with Case statement

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I'm using the built-in JEDI Code Formatter. When I format my code, the case statement ends up looking as follows:

    case Visited.ObjectState of
      posCreate:
      begin
        // my code goes here
      end;
      posUpdate:
      begin
        // my code goes here
      end;
      posDelete:
      begin
        // my code goes here
      end;
    end;

What I would like is for the begin..end block to have an extra indentation level as seen below:

    case Visited.ObjectState of
      posCreate:
        begin
          // my code goes here
        end;
      posUpdate:
        begin
          // my code goes here
        end;
      posDelete:
        begin
          // my code goes here
        end;
    end;

Does anybody know if this is possible with JCF, and if so, what setting controls this?

I toggled the "Clarify -> Indentation -> Extra indent for case..else blocks" but that didn't change anything (as I expected). I assume that setting applies only for ELSE blocks in a CASE statement, which my above code example doesn't have.

Any help would be much appreciated.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email