Search code examples
c++ghostdoc

Is there anything like GhostDoc for C++


When I'm developing in C#, I heavily use GhostDoc to speed up the process of commenting my code. I'm currently working on a C++ project and I haven't found an equivalent tool. I know about Doxygen, but from what I know it is used to create documentation outside the code, not comments in the code. Are there any good equivalent tools? I would prefer one that runs in VS, but I could handle one that works in any IDE.

(Before someone brings it up, I don't rely solely on GhostDoc to create comments. I just use it to create the starting point for my comments.)


Solution

  • Visual Assist helps by providing custom scripts executed while typing (or on other).

    For example, you can have a script for comments like this :

    /************************************************************************/
    /* My comment : $end$                                                                     */
    /************************************************************************/
    

    That would be suggested (via a combo-box exactly like intellisense) when you start typing "/**" for example. When you select this suggestion (via Enter/Space/Click - customizable), it will insert the script where your cursor is and just replace markers that are between '$' characters by special values (like the current file name for example). Here the $end$ marker will make the cursor be at this position when the script is executed. This way, you continue typing smoothly. For example with the previous script set, typing exactly :

    /** this is a test comment to show you one of the many features Visual Assit!
    

    will simply give :

    /************************************************************************/
    /* My comment : this is a test comment to show you one of the many features Visual Assit!                                                                     */
    /************************************************************************/
    

    It's really easy to customize and the behavior of the suggestion (read : intellisense++) system is customizable.