Add powershell-mode with basic function snippets (#220)

This commit is contained in:
Nathanael Merlin 2017-10-06 09:16:24 -07:00 committed by Andrea Crotti
parent 65764856df
commit 143b31a4eb
4 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,8 @@
# -*- mode: snippet -*-
# name: cmdletbinding
# key: cmd
# --
[cmdletbinding()]
Param (
$0
)

View File

@ -0,0 +1,20 @@
# -*- mode: snippet -*-
# name: comment-based-help
# key: cbh
# --
<#
.SYNOPSIS
${1:Brief description}
.DESCRIPTION
${2:Longer description}
.PARAMETER Foobar
${3:Descriptions of parameter Foobar}
.EXAMPLE
${4:Actual example}
.NOTES
${5:Additional notes}
\#>

View File

@ -0,0 +1,7 @@
# -*- mode: snippet -*-
# name: function
# key: fun
# --
Function ${1:Verb-Noun} {
$0
}

View File

@ -0,0 +1,5 @@
# -*- mode: snippet -*-
# name: parameter
# key: par
# --
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)][string]\$${1:Foobar}