From 138e6fb9ec84d660ff6def119fbd32a55140b160 Mon Sep 17 00:00:00 2001 From: Varriount Date: Mon, 17 Apr 2017 00:26:27 -0400 Subject: [PATCH] Update Default (Linux).sublime-keymap --- Default (Linux).sublime-keymap | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/Default (Linux).sublime-keymap b/Default (Linux).sublime-keymap index 894c875..eaf9506 100644 --- a/Default (Linux).sublime-keymap +++ b/Default (Linux).sublime-keymap @@ -17,5 +17,37 @@ { "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.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.empty.nim"} + ] + }, + + // Multi-line doc-comment completion + { "keys": ["["], "command": "insert_snippet", "args": {"contents": "[ $0 ]#"}, "context": + [ + { "key": "selector", "operator":"equal", "operand": "punctuation.definition.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": "^}"} + ] } -] \ No newline at end of file +]