Recent

Author Topic: Exclude Jedi Code Formatter on code section  (Read 3272 times)

rpetges

  • Jr. Member
  • **
  • Posts: 96
    • Attribute Changer Website
Exclude Jedi Code Formatter on code section
« on: November 03, 2018, 04:24:24 pm »
Hi,

I use the built-in Code Formatter to beautify my source code and would like to exclude a part of my source code from formatting.

Is there any directive I can use in source code to instruct Jedi Code Formatter to not process a part of the source code ?

Like $formatcode=off at the beginning of the block and $formatcode=on at the end of the section ?

I searched in the forums but did not find anything.

Romain

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: Exclude Jedi Code Formatter on code section
« Reply #1 on: November 03, 2018, 04:29:52 pm »
AFAIK: NO it's all or nothing. In my case nothing since it makes too many mistakes on new syntax. Unless it gets maintained it becomes less and less useful with every new release of FPC.
Specialize a type, not a var.

rpetges

  • Jr. Member
  • **
  • Posts: 96
    • Attribute Changer Website
Re: Exclude Jedi Code Formatter on code section
« Reply #2 on: November 03, 2018, 05:04:45 pm »
Thanks for the confirmation ... I think, I will switch to a 'manual' code formatting  :D

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: Exclude Jedi Code Formatter on code section
« Reply #3 on: November 05, 2018, 11:52:33 am »
@Romain

What I do when I want to clarify procedure structures is :

1 Create a new unit. (File->New->Unit)
2 Select/copy syntactically coherent full procedure/function block(s) from the source you are working on and you want to JEDI CF (From procedure SomeProc(etc... to the matching end;)
3 Paste selection it in the unit (1) at the correct position, that is in implementation for complete procedure/function(s).
4 Ctrl-D (JCF) on the unit (1).
5 If worked, paste back reformatted code to the working unit.
6 Close and discard unit created in (1)

 

TinyPortal © 2005-2018