Super Simple Documentation in Delphi

Super Simple Documentation in Delphi

Save the pastebin document as xmld_XMLDoc_Summary.xml in 

XE..XE5 – RAD Studiocode_templatesDelphi

XE6… – EmbarcaderoStudiocode_templatesDelphi

… or wherever your standard Delphi directory is.

Create a blank line above a class method or property in the interface declaration, then type xmld and fill in the blanks. If you need more than one line, add a line break and /// at the beginning of next line.

  protected

    ///

Current log line number being

    /// processed

    property LogLineNo: Integer read FLogLineNo write FLogLineNo;

Now, hover your cursor over the method or property anywhere in your code and read what you just filled in 😉

Yes – you can add a lot more XML doc attributes – but for the bare minimum – this is pretty quick and easy.  You can of course change the magic xmld keyword to anything you prefer as well.

16 thoughts on “Super Simple Documentation in Delphi


  1. Stefan Glienke – Indeed, as DI allows for proper full-blown xmldoc.  However – it seems that a lite version of DI no longer is installed by default in XE6 and XE7?


  2. Uwe Raabe – I should consult you before I even post! 🙂  I hadn’t noticed that one before.


    One difference is that mine originally was designed for one-line shorties.


  3. Lars Fosdal I didn’t mean to diminish your solution – just mention an existing alternative. Regarding the consulting: you are always welcome.


  4. Unfortunately, I turn off IDE completion due all the distraction it brings along with writing ifs and fors. A hotkey like Ctrl-Shift-C would be nice. Am I missing how to set the hotkey for this completion.


  5. Ilya S You can turn off autocomplete in which case no longer expands the template.  Instead you would press to expand the template.  Not sure if that is an improvement.  Depends on your typing style I guess.


  6. Thanks Lars Fosdal! I’ll try it.


    Btw, does Ctrl-D Ctrl-Chift-D work in XE6-XE7 if DocInsight is not installed? I could test myself, but have it installed. If it doesn’t work it sounds like a valid FR, doesn’t it?


  7. Apparently Ctrl-Shift-D doesn’t work if DocInsight ia absent. Your suggestion Lars Fosdal to use Tab for completion suits my needs, thanks!

Leave a Reply