- Code: Select all
{
"keys": ["enter"], "command": "insert_snippet",
"args":
{
"contents": "\n*$0b"
},
"context":
[
{ "key": "preceding_text", "operator": "regex_contains", "operand": "\\*", "match_all": true }
]
}
Why does that keybind match:
- Code: Select all
* Whatever|
with the pipe being the cursor position.
I'm guessing because it's translating that to: "\\*" (e.g. 0 or more backslashes)? If so, how do you match a literal asterisk? Using one backslash causes a parse error and a single or double asterisk doesn't work.