Skip to content

Commit 4030791

Browse files
Add keymap to help writing herestrings (#209)
Fixes #203
1 parent b199a65 commit 4030791

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
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+
]

0 commit comments

Comments
 (0)