Visual F# Power Tools


Auto-generating XmlDoc

This feature, originally written by Brian McNamara, auto creates Xml documentation boilerplate when you type triple-slash, following with < symbol.

For example, if you have the code:

 type SomeType() =
  
     member this.Foo(x: int, s: string) = 
         printfn "%d: %s" x s

and you type ///< anywhere on the blank line before Foo, then you get:

 type SomeType() =
    /// <summary>
    /// 
    /// </summary>
    /// <param name="x"></param>
    /// <param name="s"></param>
    member this.Foo(x:int, s:string) = 
        printfn "%d: %s" x s

Just type ///< (the slashes and < symbol may be delimited by any number of whitespace symbols) on a blank line right before a member, type, or module-scoped let (before any attributes, if there are any), and you get a blank XmlDoc template (if there wasn't already a non-empty XmlDoc there).

This is how it looks like in action Auto generate Xml doc

Multiple items
type SomeType =
  new : unit -> SomeType
  member Foo : x:int * s:string -> unit

Full name: Xmldoc.Version1.SomeType

--------------------
new : unit -> SomeType
val this : SomeType
member SomeType.Foo : x:int * s:string -> unit

Full name: Xmldoc.Version1.SomeType.Foo
val x : int
Multiple items
val int : value:'T -> int (requires member op_Explicit)

Full name: Microsoft.FSharp.Core.Operators.int

--------------------
type int = int32

Full name: Microsoft.FSharp.Core.int

--------------------
type int<'Measure> = int

Full name: Microsoft.FSharp.Core.int<_>
val s : string
Multiple items
val string : value:'T -> string

Full name: Microsoft.FSharp.Core.Operators.string

--------------------
type string = System.String

Full name: Microsoft.FSharp.Core.string
val printfn : format:Printf.TextWriterFormat<'T> -> 'T

Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.printfn
module Version2

from Xmldoc
Multiple items
type SomeType =
  new : unit -> SomeType
  member Foo : x:int * s:string -> unit

Full name: Xmldoc.Version2.SomeType

--------------------
new : unit -> SomeType
member SomeType.Foo : x:int * s:string -> unit

Full name: Xmldoc.Version2.SomeType.Foo


 <summary>
 
 </summary>
 <param name="x"></param>
 <param name="s"></param>
Fork me on GitHub