1
0
mirror of https://github.com/amix/vimrc synced 2025-07-18 17:44:59 +08:00
This commit is contained in:
huangqundl
2017-03-17 23:12:53 +08:00
parent 47b213d974
commit cba39b7326
855 changed files with 59981 additions and 35298 deletions

View File

@ -0,0 +1,58 @@
# Snippets for
# Authored by Trevor Sullivan <trevor@trevorsullivan.net>
# PowerShell Class
snippet class
class {
[string] ${0:FirstName}
}
# PowerShell Advanced Function
snippet function
function {0:name} {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $Param1
)
begin {
}
process {
}
end {
}
}
# PowerShell Splatting
snippet splatting
$Params = @{
${0:Param1} = 'Value1'
${1:Param2} = 'Value2'
}
${3:CommandName}
# PowerShell Enumeration
snippet enum
enum ${0:name} {
${1:item1}
${2:item2}
}
# PowerShell if..then
snippet if
if (${0:condition}) {
${1:statement}
}
# PowerShell While Loop
snippet while
while (${0:condition}) {
${1:statement}
}
# PowerShell Filter..Sort
snippet filtersort
${0:command} | Where-Object -FilterScript { $PSItem.${1:property} -${2:operator} '${3:expression}' } | Sort-Object -Property ${4:sortproperty}