Skip to content

Commit 2e7f416

Browse files
committed
Also add a newline after captures:
1 parent 832c2cf commit 2e7f416

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Package/Default.sublime-keymap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@
3030
{ "key": "selector", "operand": "source.yaml.sublime.syntax" },
3131
]
3232
},
33-
{ // auto-insert newline after double-colon (contexts)
34-
"keys": [":"], "command": "insert", "args": { "characters": ":\n" }, "context": [
35-
{ "key": "preceding_text", "operator": "regex_match", "operand": "^ {0,2}[^\\s:]+$", "match_all": true },
33+
{ // auto-insert space after double-colon (rules)
34+
"keys": [":"], "command": "insert", "args": { "characters": ": " }, "context": [
35+
{ "key": "preceding_text", "operator": "regex_match", "operand": "^ {4,}(- *)?[^\\s:]+$", "match_all": true },
3636
{ "key": "selection_empty", "match_all": true },
3737
{ "key": "selector", "operand": "source.yaml.sublime.syntax" },
3838
]
3939
},
40-
{ // auto-insert space after double-colon (rules)
41-
"keys": [":"], "command": "insert", "args": { "characters": ": " }, "context": [
42-
{ "key": "preceding_text", "operator": "regex_match", "operand": "^ {4,}(- *)?[^\\s:]+$", "match_all": true },
40+
{ // auto-insert newline after double-colon (contexts) and 'captures'
41+
"keys": [":"], "command": "insert", "args": { "characters": ":\n" }, "context": [
42+
{ "key": "preceding_text", "operator": "regex_match", "operand": "^ {0,2}[^\\s:]+$|^ {4,}(- *)?(captures)+$", "match_all": true },
4343
{ "key": "selection_empty", "match_all": true },
4444
{ "key": "selector", "operand": "source.yaml.sublime.syntax" },
4545
]

0 commit comments

Comments
 (0)