1
0
mirror of https://github.com/amix/vimrc synced 2025-07-05 15:35:01 +08:00

Use sources_non_forked folder for pathogen path, with sources_non_forked_fallback folder as fallback.

This commit is contained in:
Wu Tingfeng
2022-11-21 22:56:20 +08:00
parent dddd2e4152
commit d9555d618c
1756 changed files with 4 additions and 250 deletions

View File

@ -1,101 +0,0 @@
# Snippets for
# Authored by Trevor Sullivan <trevor@trevorsullivan.net>
# PowerShell Class
snippet class
class {
[string] ${1:FirstName}
}
# PowerShell Advanced Function
snippet function
function ${1:name} {
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] ${2:Param}
)
begin {
}
process {
}
end {
}
}
# PowerShell Splatting
snippet splatting
$Params = @{
${1:Param1} = '${2:Value1}'
${3:Param2} = '${4:Value2}'
}
${5:CommandName} @Params
# PowerShell Enumeration
snippet enum
enum ${1:name} {
${2:item1}
${3:item2}
}
# PowerShell if..then
snippet if
if ($1) {
$0
}
# PowerShell if..else
snippet ife
if ( $1 ) {
${2}
}
else {
${3}
}
# PowerShell While Loop
snippet while
while ($1) {
$0
}
# PowerShell Filter..Sort
snippet filtersort
${1:command} | Where-Object -FilterScript { $PSItem.${2:property} -${3:operator} '${4:expression}' } | Sort-Object -Property ${5:sortproperty}
# PowerShell foreach
snippet foreach
foreach ( $${1:iterator} in $${2:collection} ) {
$0
}
# PowerShell export-csv
snippet epcsv
Export-CSV -NoTypeInformation -Path ${1:path}
# Powershell Comment Based Help
snippet help
<#
.SYNOPSIS
${1:Short Description}
.DESCRIPTION
${2:Full Description}
.PARAMETER ${3:Param1}
${4: $3 usage}
.EXAMPLE
${5:Example}
.NOTES
${6:notes}
.LINK
${7:online help}
#>
# Powershell switch statement
snippet switch
switch ( ${1:test} ){
${2:condition1} { ${3:action} }
${4:condition2} { ${5:action} }
default { ${6:action} }