[Lazarus] Code formatting help needed with Case statement

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Apr 19 12:19:53 CEST 2017


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


More information about the Lazarus mailing list