-
Notifications
You must be signed in to change notification settings - Fork 34
/
Default.sublime-keymap
34 lines (32 loc) · 1.54 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
[
// Doc-comment completion
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n## $0"}, "context":
[
{ "key": "setting.doccontinue.enabled", "operand": true },
{ "key": "preceding_text", "operand": "# *$", "operator": "not_regex_contains" },
{ "key": "selector", "operand": "comment.line.documentation.nim" },
]
},
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n## $0"}, "context":
[
{ "key": "setting.doccontinue.enabled", "operand": true },
{ "key": "setting.doccontinue.autostop", "operand": false },
{ "key": "selector", "operand": "comment.line.documentation.nim" },
]
},
// Multi-line doc-comment completion
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[$0]##"}, "context":
[
{ "key": "selector", "operator":"equal", "operand": "comment.line.documentation.nim punctuation.definition.comment.nim"},
{ "key": "preceding_text", "operator":"regex_contains", "operand": "##$"},
]
},
// Pragma completion
{ "keys": ["."], "command": "insert_snippet", "args": {"contents": ".$0."}, "context":
[
{ "key": "selector", "operand": "source.nim" },
{ "key": "preceding_text", "operator": "regex_contains", "operand": "{$"},
{ "key": "following_text", "operator": "regex_contains", "operand": "^}"}
]
}
]