Hi, Im going batty over something I thought I saw a little while back: Is there a way (shortcut keys) to quickly generate/add the help block in VS Code?
I thought I saw a video about keys to automatically generate <# .SYNOPSIS .DESCRIPTION … etc. #>, so I dont have to type it out all the time.
Anyone help with the keys, the process or tell me if it is a plugin?
If I got it right you’ve seen someone using a keyboard shortcut for a code snippet. Here you have good tutorial how to create both. (it shows the trick with another language but I think you can get the idea)
And BTW: you don’t have to use a keyboard shortcut at all. I use my snippets only with their prefix.
I didn’t know about comment-help very useful thankyou, I generaly just remember the comment help blocks as follows:-
<#
.SYNOPSIS
.DESCRIPTION
.PARAMETER Name
.PARAMETER Other
.INPUTS
.OUTPUTS
.EXAMPLE
.NOTES
.LINK
#>
because once you have already created the help and then you update the function you don’t need to add a whole help block just the one bit you need to update.
or use something like:-
get-help get-help -ShowWindow
and look for the names of the different sections.
if you write a lot of functions you will just start to remember them