Closed rchl closed 1 year ago
`test`
`
Expected: The backtick is overwritten Actual: Another backtick is inserted before the existing one.
This works with built-in syntax.
The scopes at this position are:
text.html.markdown meta.paragraph.markdown markup.raw.inline.markdown punctuation.definition.raw.end.markdown
MarkdownEditing comes with a keybinding for handling this:
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true }, { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } ] },
but it doesn't handle this case because of the - markup.raw.
- markup.raw
The built-in syntax comes with the following keybinding:
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ { "key": "setting.auto_match_enabled" }, { "key": "selection_empty", "operand": true, "match_all": true }, { "key": "selector", "operand": "text.html.markdown markup.raw - markup.raw.code-fence - meta.code-fence" }, { "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true } ] },
So it works there because it doesn't exclude markup.raw.
markup.raw
The keybinding for backspace also has similar problem -- it doesn't handle pressing backspace between two backticks.
backspace
`
`
Expected: The backtick is overwritten Actual: Another backtick is inserted before the existing one.
This works with built-in syntax.
The scopes at this position are:
MarkdownEditing comes with a keybinding for handling this:
but it doesn't handle this case because of the
- markup.raw
.The built-in syntax comes with the following keybinding:
So it works there because it doesn't exclude
markup.raw
.