-
Notifications
You must be signed in to change notification settings - Fork 3
/
Default.sublime-keymap
42 lines (42 loc) · 1.85 KB
/
Default.sublime-keymap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
[
{
// When inside an item group, insert a new item when pressing enter.
"keys": ["enter"],
"command": "run_macro_file",
"args": {"file": "Packages/xit!/macros/Append Item.sublime-macro"},
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.xit" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^(\\[.\\]| ).+", "match_all": true },
]
}, {
// If the line contains just an empty item, clear it out when pressing enter.
"keys": ["enter"],
"command": "run_macro_file",
"args": {"file": "Packages/xit!/macros/Clear Void Item.sublime-macro"},
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.xit" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^(\\[.\\])? *$", "match_all": true },
]
}, {
// When inside an item scope, continue the description (indented) when pressing shift+enter.
"keys": ["shift+enter"],
"command": "run_macro_file",
"args": {"file": "Packages/xit!/macros/Append Description Line.sublime-macro"},
"context": [
{ "key": "selector", "operator": "equal", "operand": "meta.description.xit" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^(\\[.\\] | ).*", "match_all": true },
]
}, {
// When at the beginning of a line and pressing `[`, complete to `[ ] `.
"keys": ["["],
"command": "run_macro_file",
"args": {"file": "Packages/xit!/macros/Insert Open Checkbox.sublime-macro"},
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.xit" },
{ "key": "preceding_text", "operator": "regex_match", "operand": "^$", "match_all": true },
]
},
]