Jump to content
Sign in to follow this  
Sonjli

Formatting method

Recommended Posts

Hello,

I have a strange behaviour when I add a new parameter in a method.

My method has 2 params like this

procedure TForm1.Test(
  const par1: Integer;
  const par2: string
  );
begin
  // ...
end;

I add the new param with

image.thumb.png.f1b1c16a800beb5715a538c3140d46d9.png

 

The result is a wrong formatted code:

procedure TForm1.Test(const Par1: Integer; const Par2: string; const NewParam:
    Integer);
begin
  //
end;

The more params there are, the worst is the formatting...

 

I would like to maintain the same formatting for my params.

 

Any hint?

 

Thanks,

Eddy

Share this post


Link to post

MMX uses an internal formatting scheme which is not adjustable. You need to re-format your code manually or with the IDE formatter.

  • Sad 1

Share this post


Link to post

Ok Uwe. If you don't want to want to solve this simple issue for a poor, poor programmer, I'll do it myself :classic_biggrin:

Seriously, I understand. So I found a configuration for the standard formatter I share for others if they find it useful:

image.png.0040c0b531bba52ff9c2ae2e93fd1ef2.png

This solve my terrible (:classic_tongue:) problem wtih MMX.

 

Thanks Uwe

 

Share this post


Link to post

@Sonjli You could also just add the new paramater(s) in either the declaration or the implementation of the method. Then hit STRG + ALT + Shift + P and the other one will be updated to the just made changes!

  • Thanks 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×