Skip to content

Commit 2b91823

Browse files
committed
Removed if-else as it can be composed via if and else and that gives choice of cuddling.
1 parent fd1ea30 commit 2b91823

File tree

1 file changed

+10
-22
lines changed

1 file changed

+10
-22
lines changed

snippets/PowerShell.json

+10-22
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,15 @@
626626
],
627627
"description": "do-while loop"
628628
},
629+
"while": {
630+
"prefix": "while",
631+
"body": [
632+
"while (${condition}) {",
633+
"\t$0",
634+
"}"
635+
],
636+
"description": "while loop"
637+
},
629638
"for": {
630639
"prefix": "for",
631640
"body": [
@@ -660,7 +669,7 @@
660669
"\t$0",
661670
"}"
662671
],
663-
"description": "function"
672+
"description": "function definition"
664673
},
665674
"if": {
666675
"prefix": "if",
@@ -671,18 +680,6 @@
671680
],
672681
"description": "if statement"
673682
},
674-
"if-else": {
675-
"prefix": "if-else",
676-
"body": [
677-
"if (${condition}) {",
678-
"\t$1",
679-
"}",
680-
"else {",
681-
"\t$2",
682-
"}"
683-
],
684-
"description": "if-else statement"
685-
},
686683
"elseif": {
687684
"prefix": "elseif",
688685
"body": [
@@ -750,15 +747,6 @@
750747
],
751748
"description": "try-finally exception handling"
752749
},
753-
"while": {
754-
"prefix": "while",
755-
"body": [
756-
"while (${condition}) {",
757-
"\t$0",
758-
"}"
759-
],
760-
"description": "while loop"
761-
},
762750

763751
"Workflow": {
764752
"prefix": "workflow",

0 commit comments

Comments
 (0)