Search code examples
delphidelphi-10.2-tokyo

How to protect a fragment of code from auto-formatting CTRL+D in delphi


Is there any directive to prevent fragment of code from being changed?

For example:

procedure Test;
{CODE_FORMATTER OFF}
const  a1 = 'a';  a2 = 'b';  a3 = 'c';    
                  b2 = 'd';  b3 = 'e';

{CODE_FORMATTER ON}
begin
end;    
   

Solution

  • Is there any directive to prevent fragment of code from being changed?

    No there is not.