Sonjli 6 Posted June 13, 2022 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 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
Uwe Raabe 2057 Posted June 13, 2022 MMX uses an internal formatting scheme which is not adjustable. You need to re-format your code manually or with the IDE formatter. 1 Share this post Link to post
Sonjli 6 Posted June 14, 2022 Ok Uwe. If you don't want to want to solve this simple issue for a poor, poor programmer, I'll do it myself Seriously, I understand. So I found a configuration for the standard formatter I share for others if they find it useful: This solve my terrible () problem wtih MMX. Thanks Uwe Share this post Link to post
TheDelphiCoder 2 Posted June 22, 2022 @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! 1 Share this post Link to post
Berocoder 14 Posted February 8, 2023 Or Ctrl + Alt + y with MMX formatter installed. It is a bit easier for fingers 😊 Share this post Link to post
programmerdelphi2k 237 Posted February 8, 2023 (edited) when all go wrong, you can "force it" using the "comments chars alignment" to provocate your break-line! + "Ctrl+D" (IDE) ... and Formatter options... I Love it! 😍 procedure TForm1.Test( { indent comments + breakline } const Part1: integer; { } const part2: string; { } var part3: boolean); begin end; MyFormatterOptions.7z Edited February 8, 2023 by programmerdelphi2k Share this post Link to post