Well, actually, to be precise.
This works correctly: when I press 'a' at beginning of line or
after a space, \alpha is inserted:
{
"keys": ["a"],
"command": "insert_snippet",
"args": {"contents": "\\alpha"},
"context":
[
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^$|.*?\\s$" }
]
}
But this does not work: if I press 'a' and then 'b' nothing happens:
{
"keys": ["a", "b"],
"command": "insert_snippet",
"args": {"contents": "\\alpha"},
"context":
[
{ "key": "preceding_text", "operator": "regex_contains", "operand": "^$|.*?\\s$" }
]
}
So the problem is with multiple key bindings. If I remove
the $ character from the regex, the binding works, but
it captures any space and not only a space before the
cursor. Is this the expected behaviour?