Code Formatter in Florence

In my installation of Athens the right click on source code did not offer “Format Source” but for a variety of other reasons I mainly used older versions of Delphi. I have now installed Florence and right click shows “Format Source” but it is disabled.

The Help is out of date Formatting Source Code - RAD Studio

How do I get “Format Source” to work.

In Delphi 13? By using a 3rd party formatter, since the formatter was removed.

1 Like

I am using the JEDI Code Formatter (JCF). It is highly configurable to match pretty much any formatting style.

It has small problems with anonymous methods and a couple other obscure Delphi code constructs, but overall does a great job.

JCF can be integrated into the IDE and launched with a configurable hot-key event.

I believe you can download the source code from GitHub.

https://github.com/quadroid/jcf-pascal-format

I suspected that was the case but when I looked in help it said it was in the product.

If I do add a third party formatter will “Format Source” become enabled in right click or is that menu item only for the HTML formatter which apparently is included.

Thanks Kevin for the JCF recommendation

You can disable the stock source code formatter in the IDE (if any) and use JCF or another formatter’s hotkey sequence. JCF allows you to change the hotkeys that fire off the formatting process.

Don’t be afraid of trashing your source code as you zero in on a personal formatting style. If you don’t like the results then hit ^Z to back out of the formatting change and try new JCF settings.

JCF can also adjust token CaSe. There is a list you can modify to force case rules on any token… Thing like clRed, CLRED, clred, CLred, Etc.

1 Like