[Lazarus] Format code on Save

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Wed Jan 25 14:25:56 CET 2017


On 2017-01-25 13:15, Mattias Gaertner via Lazarus wrote:
> I can add an event called before saving a source editor file.
> Would that help you?

I think a "after save" event is needed instead? Does JCF format code
directly from memory (SynEdit's buffer), or does it read and format a
file from disk. If the latter, then I guess a "after save" event would
indeed be helpful.


> Does the JCF formatter work with bookmarks, folds and breakpoints?

The JCF I'm using is pretty old. I'll have to double check the state of
the JCF included with Lazarus, but I'm pretty sure its much newer than
the one I use.

Would bookmarks, code-folding etc matter.... if JCF reads files from disk?


Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


More information about the Lazarus mailing list