Skip to content

Fix snippet prefixes (especially #region) #3900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions snippets/PowerShell.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
]
},
"Function-Inline": {
"prefix": "Function-Inline",
"prefix": "function-inline",
"description": "Function definition snippet that does not contain a param block, but defines parameters inline. This syntax is commonly used in other languages. More: Get-Help about_Functions",
"body": [
"function ${1:FunctionName} (${2:OptionalParameters}) {",
Expand All @@ -256,7 +256,7 @@
]
},
"Hashtable": {
"prefix": "Hashtable",
"prefix": "hashtable",
"description": "A key/value store that are very efficient for finding and retrieving data. More: Get-Help about_Hash_Tables",
"body": [
"\\$${1:Var} = @{",
Expand Down Expand Up @@ -328,7 +328,7 @@
]
},
"IfShouldProcess": {
"prefix": "if-Should-Process",
"prefix": "if-should-process",
"description": "Defines a condition that only executes if -WhatIf is not set, and returns a message otherwise. More: https://docs.microsoft.com/en-us/powershell/scripting/learn/deep-dives/everything-about-shouldprocess",
"body": [
"if (\\$PSCmdlet.ShouldProcess(\"${1:Target}\", \"${2:Operation}\")) {",
Expand Down Expand Up @@ -539,7 +539,7 @@
]
},
"Region Block": {
"prefix": "#region",
"prefix": "region",
"description": "Region block for organizing and folding of your code",
"body": [
"#region ${1}",
Expand Down