Skip to content

Commit bd0f068

Browse files
committed
Keymap: Fix markup.raw auto-pairing key bindings
Fixes #707
1 parent 2d74dc7 commit bd0f068

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

Default (Linux).sublime-keymap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
127127
[
128-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
128+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
129129
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
130130
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
131131
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
@@ -134,21 +134,21 @@
134134
},
135135
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
136136
[
137-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
137+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
138138
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
139139
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
140140
]
141141
},
142142
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
143143
[
144-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
144+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
145145
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
146146
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
147147
]
148148
},
149149
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
150150
[
151-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
151+
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
152152
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
153153
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
154154
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },

Default (OSX).sublime-keymap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
127127
[
128-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
128+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
129129
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
130130
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
131131
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
@@ -134,21 +134,21 @@
134134
},
135135
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
136136
[
137-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
137+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
138138
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
139139
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
140140
]
141141
},
142142
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
143143
[
144-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
144+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
145145
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
146146
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
147147
]
148148
},
149149
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
150150
[
151-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
151+
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
152152
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
153153
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
154154
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },

Default (Windows).sublime-keymap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@
125125

126126
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`$0`"}, "context":
127127
[
128-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
128+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
129129
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
130130
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
131131
{ "key": "preceding_text", "operator": "not_regex_contains", "operand": "[\\w`]$", "match_all": true },
@@ -134,21 +134,21 @@
134134
},
135135
{ "keys": ["`"], "command": "insert_snippet", "args": {"contents": "`${0:$SELECTION}`"}, "context":
136136
[
137-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
137+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - markup.kbd", "match_all": true },
138138
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
139139
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }
140140
]
141141
},
142142
{ "keys": ["`"], "command": "move", "args": {"by": "characters", "forward": true}, "context":
143143
[
144-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
144+
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.raw - meta.code-fence - markup.raw.code-fence", "match_all": true },
145145
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
146146
{ "key": "following_text", "operator": "regex_contains", "operand": "^`", "match_all": true }
147147
]
148148
},
149149
{ "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Left Right.sublime-macro"}, "context":
150150
[
151-
{ "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw - markup.kbd", "match_all": true },
151+
{ "key": "selector", "operator": "equal", "operand": "punctuation.definition.raw.begin.markdown", "match_all": true },
152152
{ "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
153153
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
154154
{ "key": "preceding_text", "operator": "regex_contains", "operand": "`$", "match_all": true },

messages/3.1.6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ feedback you can use [GitHub issues][issues].
66
## Bug Fixes
77

88
* Respect `set_unsaved_view_name` setting (#704)
9+
* Fix `markup.raw` auto-pairing key bindings (#707)
910

1011
## New Features
1112

0 commit comments

Comments
 (0)