|
30 | 30 | { "key": "selector", "operand": "source.yaml.sublime.syntax" }, |
31 | 31 | ] |
32 | 32 | }, |
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 }, |
36 | 36 | { "key": "selection_empty", "match_all": true }, |
37 | 37 | { "key": "selector", "operand": "source.yaml.sublime.syntax" }, |
38 | 38 | ] |
39 | 39 | }, |
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 }, |
43 | 43 | { "key": "selection_empty", "match_all": true }, |
44 | 44 | { "key": "selector", "operand": "source.yaml.sublime.syntax" }, |
45 | 45 | ] |
|
0 commit comments