Skip to content

Commit 723b8d1

Browse files
committed
add snippets, update syntax def
1 parent d84d3fe commit 723b8d1

5 files changed

+23
-2
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<snippet>
2+
<content><![CDATA[catch ${1:[Exception]}{
3+
$2
4+
}$0]]></content>
5+
<tabTrigger>catch</tabTrigger>
6+
<scope>source.powershell</scope>
7+
</snippet>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<snippet>
2+
<content><![CDATA[finally {
3+
$1
4+
}$0]]></content>
5+
<tabTrigger>fin</tabTrigger>
6+
<scope>source.powershell</scope>
7+
</snippet>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<snippet>
2+
<content><![CDATA[try {
3+
$1
4+
}$0]]></content>
5+
<tabTrigger>try</tabTrigger>
6+
<scope>source.powershell</scope>
7+
</snippet>

Support/PowershellSyntax.JSON-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"name": "support.function.powershell"
134134
},
135135
{
136-
"match": "\\b(?i:if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end|function|global|local|private|script|contained)\\b",
136+
"match": "\\b(?i:if|else|elseif|switch|while|default|try|finally|catch|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end|function|global|local|private|script|contained)\\b",
137137
"name": "keyword.control.powershell"
138138
},
139139
{

Support/PowershellSyntax.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
</dict>
212212
<dict>
213213
<key>match</key>
214-
<string>\b(?i:if|else|elseif|switch|while|default|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end|function|global|local|private|script|contained)\b</string>
214+
<string>\b(?i:if|else|elseif|switch|while|default|try|finally|catch|for|do|until|break|continue|foreach|return|filter|in|trap|throw|param|begin|process|end|function|global|local|private|script|contained)\b</string>
215215
<key>name</key>
216216
<string>keyword.control.powershell</string>
217217
</dict>

0 commit comments

Comments
 (0)