Skip to content

Commit 7c57929

Browse files
lipkauTylerLeonhardt
authored andcommitted
Add new snippet for #region (#1368)
* Add new snippet for #region * Removed name of region on end * Moved Markdown rule to other PR
1 parent 9bf58a7 commit 7c57929

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

docs/community_snippets.md

+20
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ _To contribute, check out our [guide here](#contributing)._
2828
| [PesterTestForMandatoryParameter](#pestertestformandatoryparameter) | _Create Pester test for a mandatory parameter_ |
2929
| [PesterTestForParameter](#pestertestforparameter) | _Create Pester test for parameter_ |
3030
| [PSCustomObject](#pscustomobject) | _A simple PSCustomObject by @brettmillerb_ |
31+
| [Region Block](#region-block) | _Region Block for organizing and folding of your code_ |
3132

3233
## Snippets
3334

@@ -271,6 +272,7 @@ Quickly create a Pester Test for existence of a parameter by @SQLDBAWithABeard
271272
"description": "Pester Test for Parameter"
272273
}
273274
```
275+
274276
### PSCustomObject
275277

276278
A simple PSCustomObject by @brettmillerb. It has 4 properties that you can tab through to quickly fill in.
@@ -292,6 +294,24 @@ A simple PSCustomObject by @brettmillerb. It has 4 properties that you can tab t
292294
}
293295
```
294296

297+
### Region Block
298+
299+
Use the `#region` for organizing your code (including good code folding).
300+
301+
#### Snippet
302+
303+
```json
304+
"Region Block": {
305+
"prefix": "#region",
306+
"body": [
307+
"#region ${1}",
308+
"${2}",
309+
"#endregion"
310+
],
311+
"description": "Region Block for organizing and folding of your code"
312+
}
313+
```
314+
295315
## Contributing
296316

297317
If you'd like to add a snippet to this list, [open a pull request](https://opensource.guide/how-to-contribute/#opening-a-pull-request) with the following changes:

snippets/PowerShell.json

+9
Original file line numberDiff line numberDiff line change
@@ -943,5 +943,14 @@
943943
"}"
944944
],
945945
"description": "Creates a Hashtable"
946+
},
947+
"Region Block": {
948+
"prefix": "#region",
949+
"body": [
950+
"#region ${1}",
951+
"${2}",
952+
"#endregion"
953+
],
954+
"description": "Region Block for organizing and folding of your code"
946955
}
947956
}

0 commit comments

Comments
 (0)