latest WIP
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[begin { $1
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>beg</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[catch ${1:[Exception]}{
|
||||
$2
|
||||
}$0]]></content>
|
||||
<tabTrigger>catch</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,12 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[<#
|
||||
$0
|
||||
#>]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>comm</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
<!-- Optional: Description to show in the menu -->
|
||||
<description>Comment block</description>
|
||||
</snippet>
|
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[elseif ($1) {
|
||||
$2
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>elif</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,8 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[elseif ($1) { $2 }]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>elifi</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[else {
|
||||
$1
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>else</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,8 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[else { $1 }]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>elsei</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,9 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[end { $1
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>end</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
10
Sublime/PowerShell/Snippets/(fil) new filter.sublime-snippet
Normal file
10
Sublime/PowerShell/Snippets/(fil) new filter.sublime-snippet
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[filter ${1:filterName} {
|
||||
$2
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>fil</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[finally {
|
||||
$1
|
||||
}$0]]></content>
|
||||
<tabTrigger>fin</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[function ${1:funcName} {
|
||||
$2
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>fun</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[@'
|
||||
$1
|
||||
'@]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>here</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[@"
|
||||
$1
|
||||
"@]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>hhere</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
10
Sublime/PowerShell/Snippets/(if) if {...}.sublime-snippet
Normal file
10
Sublime/PowerShell/Snippets/(if) if {...}.sublime-snippet
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[if ($1) {
|
||||
$2
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>if</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,13 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[if ($1) {
|
||||
$2
|
||||
}
|
||||
else {
|
||||
$3
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>ifelse</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,8 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[if ($1) { $2 }]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>ifi</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,8 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[${1:\$mydocs} = [environment]::GetFolderPath([environment+specialfolder]::MyDocuments)]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>mydocs</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,9 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[process { $1
|
||||
}]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>proc</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,8 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[\$($1)]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>sub</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,9 @@
|
||||
<!-- See http://www.sublimetext.com/docs/snippets for more information -->
|
||||
<snippet>
|
||||
<content><![CDATA[\$tmpfile = [io.path]::GetTempFileName()
|
||||
]]></content>
|
||||
<!-- Optional: Tab trigger to activate the snippet -->
|
||||
<tabTrigger>tmp</tabTrigger>
|
||||
<!-- Optional: Scope the tab trigger will be active in -->
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[try {
|
||||
$1
|
||||
}$0]]></content>
|
||||
<tabTrigger>try</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[@'
|
||||
$0
|
||||
'@]]></content>
|
||||
<tabTrigger>hered</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,7 @@
|
||||
<snippet>
|
||||
<content><![CDATA[@"
|
||||
$0
|
||||
"@]]></content>
|
||||
<tabTrigger>heredd</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
@@ -0,0 +1,5 @@
|
||||
<snippet>
|
||||
<content><![CDATA[\$script:thisDir = split-path \$MyInvocation.MyCommand.Path -parent]]></content>
|
||||
<tabTrigger>thisdir</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
17
Sublime/PowerShell/Snippets/Powershell.sublime-completions
Normal file
17
Sublime/PowerShell/Snippets/Powershell.sublime-completions
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"scope": "source.powershell",
|
||||
|
||||
"completions": [
|
||||
{ "trigger": "dict", "contents": "@{$1$0}" },
|
||||
{ "trigger": "arr", "contents": "@($0)" },
|
||||
{ "trigger": "req", "contents": "#requires -$0" },
|
||||
{ "trigger": "reqp", "contents": "#requires -pssnapin $0" },
|
||||
{ "trigger": "reqv", "contents": "#requires -version ${0:2}" },
|
||||
{ "trigger": "void", "contents": "[void] ($1)$0" },
|
||||
{ "trigger": "sb", "contents": "\\${$1}$0" },
|
||||
{ "trigger": "wd", "contents": "write-debug -message \"$1\"$0" },
|
||||
{ "trigger": "wh", "contents": "write-host \"$1\"" },
|
||||
{ "trigger": "ww", "contents": "write-warning $0" },
|
||||
{ "trigger": "param", "contents": "param(\\$${1:paramName})" }
|
||||
]
|
||||
}
|
@@ -0,0 +1,5 @@
|
||||
<snippet>
|
||||
<content><![CDATA[set-psdebug ${1:-${2:Step}}$0]]></content>
|
||||
<tabTrigger>sd</tabTrigger>
|
||||
<scope>source.powershell</scope>
|
||||
</snippet>
|
Reference in New Issue
Block a user