Skip to content

Commit c293409

Browse files
committed
Merge branch 'master' into refactor
2 parents 2cb109e + 4030791 commit c293409

File tree

2 files changed

+126
-12
lines changed

2 files changed

+126
-12
lines changed

Default.sublime-keymap

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
[
2+
{
3+
"keys": ["\""],
4+
"command": "chain",
5+
"args": {
6+
"commands": [{
7+
"command": "insert",
8+
"args": {"characters": "\"\n" },
9+
}, {
10+
"command": "run_macro_file",
11+
"args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"},
12+
}, {
13+
"command": "insert",
14+
"args": {"characters": "\"@" },
15+
}, {
16+
"command": "move",
17+
"args": {"by": "characters", "forward": false},
18+
}, {
19+
"command": "move",
20+
"args": {"by": "characters", "forward": false},
21+
}, {
22+
"command": "move",
23+
"args": {"by": "characters", "forward": false},
24+
}],
25+
},
26+
"context": [
27+
{ "key": "selection_empty", "match_all": true },
28+
{ "key": "selector", "operand": "source.powershell - string", "match_all": true },
29+
{ "key": "preceding_text", "operator": "regex_contains", "operand": "@", "match_all": true },
30+
]
31+
},
32+
{
33+
"keys": ["'"],
34+
"command": "chain",
35+
"args": {
36+
"commands": [{
37+
"command": "insert",
38+
"args": {"characters": "'\n" },
39+
}, {
40+
"command": "run_macro_file",
41+
"args": {"file": "res://Packages/Default/Delete to Hard BOL.sublime-macro"},
42+
}, {
43+
"command": "insert",
44+
"args": {"characters": "'@" },
45+
}, {
46+
"command": "move",
47+
"args": {"by": "characters", "forward": false},
48+
}, {
49+
"command": "move",
50+
"args": {"by": "characters", "forward": false},
51+
}, {
52+
"command": "move",
53+
"args": {"by": "characters", "forward": false},
54+
}],
55+
},
56+
"context": [
57+
{ "key": "selection_empty", "match_all": true },
58+
{ "key": "selector", "operand": "source.powershell - string", "match_all": true },
59+
{ "key": "preceding_text", "operator": "regex_contains", "operand": "@", "match_all": true },
60+
]
61+
},
62+
]

snippets/PowerShell.sublime-completions

Lines changed: 64 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,68 @@
22
"scope": "source.powershell",
33

44
"completions": [
5-
{ "trigger": "dict\thashtable", "contents": "@{$1$0}" },
6-
{ "trigger": "arr\tarray", "contents": "@($0)" },
7-
{ "trigger": "req\trequires", "contents": "#requires -$0" },
8-
{ "trigger": "reqp\trequires", "contents": "#requires -pssnapin $0" },
9-
{ "trigger": "reqv\trequires", "contents": "#requires -version ${0:2}" },
10-
{ "trigger": "void", "contents": "[void] ($1)$0" },
11-
{ "trigger": "sb", "contents": "\\${$1}$0" },
12-
{ "trigger": "wd\twrite-debug", "contents": "write-debug -message \"$1\"$0" },
13-
{ "trigger": "wh\twrite-host", "contents": "write-host \"$1\"" },
14-
{ "trigger": "ww\twrite-warning", "contents": "write-warning $0" },
15-
{ "trigger": "param", "contents": "param(\\$${1:paramName})" }
16-
]
5+
{
6+
"trigger": "dict",
7+
"contents": "@{$1$0}",
8+
"annotation": "hashtable",
9+
"kind": "snippet",
10+
},
11+
{
12+
"trigger": "arr",
13+
"contents": "@($0)",
14+
"annotation": "array",
15+
"kind": "snippet",
16+
},
17+
{
18+
"trigger": "req",
19+
"contents": "#requires -$0",
20+
"annotation": "requires",
21+
"kind": "snippet",
22+
},
23+
{
24+
"trigger": "reqp",
25+
"contents": "#requires -pssnapin $0",
26+
"annotation": "requires",
27+
"kind": "snippet",
28+
},
29+
{
30+
"trigger": "reqv",
31+
"contents": "#requires -version ${0:2}",
32+
"annotation": "requires",
33+
"kind": "snippet",
34+
},
35+
{
36+
"trigger": "void",
37+
"contents": "[void] ($1)$0",
38+
"kind": "snippet",
39+
},
40+
{
41+
"trigger": "sb",
42+
"contents": "\\${$1}$0",
43+
"kind": "snippet",
44+
},
45+
{
46+
"trigger": "wd",
47+
"contents": "write-debug -message \"$1\"$0",
48+
"annotation": "write-debug",
49+
"kind": "snippet",
50+
},
51+
{
52+
"trigger": "wh",
53+
"contents": "write-host \"$1\"",
54+
"annotation": "write-host",
55+
"kind": "snippet",
56+
},
57+
{
58+
"trigger": "ww",
59+
"contents": "write-warning $0",
60+
"annotation": "write-warning",
61+
"kind": "snippet",
62+
},
63+
{
64+
"trigger": "param",
65+
"contents": "param(\\$${1:paramName})",
66+
"kind": "snippet",
67+
},
68+
],
1769
}

0 commit comments

Comments
 (0)