forked from nim-lang/NimLime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default (OSX).sublime-keymap
60 lines (57 loc) · 2.58 KB
/
Default (OSX).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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
[
{"keys": ["f12"], "command": "gotodef", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.nim" },
{ "key": "selector", "operator": "equal", "operand": "source.nims" }
]
},
{"keys": ["shift+alt+i"], "command": "lookup", "context":
[
{ "key": "selector", "operator": "equal", "operand": "source.nim" },
{ "key": "selector", "operator": "equal", "operand": "source.nims" }
]
},
{ "keys": ["ctrl+space"], "command": "nim_update_completions", "context":
[
{ "key": "auto_complete_visible" },
{ "key": "selector", "operator": "equal", "operand": "source.nim" },
{ "key": "selector", "operator": "equal", "operand": "source.nims" }
]
},
// Doc-comment completion
{ "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "\n## $0"}, "context":
[
{ "key": "setting.doccontinue.enabled", "operand": true },
{ "key": "selection_empty", "operand": true },
{ "key": "selector", "operand": "comment.line.number-sign.doc-comment.body.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.number-sign.doc-comment.nim" },
{ "key": "selector", "operand": "punctuation.definition.doc-comment.nim", "operator": "not_equal" }
]
},
// Multi-line comment completion
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[\n$0\n]#"}, "context":
[
{ "key": "selector", "operator":"equal", "operand": "punctuation.definition.comment.nim"}
]
},
// Multi-line doc-comment completion
{ "keys": ["["], "command": "insert_snippet", "args": {"contents": "[\n$0\n]##"}, "context":
[
{ "key": "selector", "operator":"equal", "operand": "punctuation.definition.doc-comment.nim"}
]
},
// 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": "^}"}
]
}
]