|
66 | 66 | { "key": "selector", "operator": "not_equal", "operand": "markup.raw", "match_all": true }
|
67 | 67 | ]
|
68 | 68 | },
|
69 |
| - { "keys": ["tab"], "command": "indent_list_item", "context": |
70 |
| - [ |
71 |
| - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
72 |
| - { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(>\\s*)?$", "match_all": true }, |
73 |
| - { "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[*+\\-]\\s+", "match_all": true }, |
74 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }, |
75 |
| - { "key": "selector", "operator": "not_equal", "operand": "markup.raw", "match_all": true } |
76 |
| - ] |
77 |
| - }, |
78 | 69 | { "keys": ["tab"], "command": "indent_list_multiitem", "context":
|
79 | 70 | [
|
80 | 71 | { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
|
|
91 | 82 | { "key": "selector", "operator": "not_equal", "operand": "markup.raw", "match_all": true }
|
92 | 83 | ]
|
93 | 84 | },
|
94 |
| - { "keys": ["shift+tab"], "command": "indent_list_item", "args": {"reverse": true}, "context": |
95 |
| - [ |
96 |
| - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
97 |
| - { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(>\\s*)?$", "match_all": true }, |
98 |
| - { "key": "following_text", "operator": "regex_contains", "operand": "^\\s*[*+\\-]\\s+", "match_all": true }, |
99 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }, |
100 |
| - { "key": "selector", "operator": "not_equal", "operand": "markup.raw", "match_all": true } |
101 |
| - ] |
102 |
| - }, |
103 | 85 | { "keys": ["shift+tab"], "command": "indent_list_multiitem", "args": {"reverse": true}, "context":
|
104 | 86 | [
|
105 | 87 | { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
|
|
195 | 177 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
196 | 178 | ]
|
197 | 179 | },
|
198 |
| - // Bold on super + Alt + B |
199 |
| - { "keys": ["super+alt+b"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Transform Word - Bold - Asterisk.sublime-macro"}, "context": |
200 |
| - [ |
201 |
| - { "key": "setting.mde.bold_marker_asterisk", "operator": "equal", "operand": true }, |
202 |
| - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
203 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } |
204 |
| - ] |
205 |
| - }, |
| 180 | + // Bold on Super + Alt + B |
206 | 181 | { "keys": ["super+alt+b"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Transform Word - Bold.sublime-macro"}, "context":
|
207 | 182 | [
|
208 |
| - { "key": "setting.mde.bold_marker_asterisk", "operator": "equal", "operand": false }, |
209 | 183 | { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
210 | 184 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
211 | 185 | ]
|
212 | 186 | },
|
213 |
| - { "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "**$1**"}, "context": |
214 |
| - [ |
215 |
| - { "key": "setting.mde.bold_marker_asterisk", "operator": "equal", "operand": true }, |
216 |
| - { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |
217 |
| - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
218 |
| - { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }, |
219 |
| - { "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true }, |
220 |
| - { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true }, |
221 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } |
222 |
| - ] |
223 |
| - }, |
224 |
| - { "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "__$1__"}, "context": |
| 187 | + { "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "${MD_BOLD_MARKER}$1${MD_BOLD_MARKER}"}, "context": |
225 | 188 | [
|
226 |
| - { "key": "setting.mde.bold_marker_asterisk", "operator": "equal", "operand": false }, |
227 | 189 | { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
228 | 190 | { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
229 | 191 | { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true },
|
|
232 | 194 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
233 | 195 | ]
|
234 | 196 | },
|
235 |
| - { "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "**${SELECTION/(^[\\*_]*|[\\*_]*$)//g}**"}, "context": |
236 |
| - [ |
237 |
| - { "key": "setting.mde.bold_marker_asterisk", "operator": "equal", "operand": true }, |
238 |
| - { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |
239 |
| - { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, |
240 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } |
241 |
| - ] |
242 |
| - }, |
243 |
| - { "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "__${SELECTION/(^[\\*_]*|[\\*_]*$)//g}__"}, "context": |
| 197 | + { "keys": ["super+alt+b"], "command": "insert_snippet", "args": {"contents": "${MD_BOLD_MARKER}${SELECTION/(^[\\*_]*|[\\*_]*$)//g}${MD_BOLD_MARKER}"}, "context": |
244 | 198 | [
|
245 |
| - { "key": "setting.mde.bold_marker_asterisk", "operator": "equal", "operand": false }, |
246 | 199 | { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
247 | 200 | { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
|
248 | 201 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
249 | 202 | ]
|
250 | 203 | },
|
251 |
| - // italics on super + Alt + I |
252 |
| - { "keys": ["super+alt+i"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Transform Word - Italic - Asterisk.sublime-macro"}, "context": |
253 |
| - [ |
254 |
| - { "key": "setting.mde.italic_marker_asterisk", "operator": "equal", "operand": true }, |
255 |
| - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
256 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } |
257 |
| - ] |
258 |
| - }, |
| 204 | + // italics on Super + Alt + I |
259 | 205 | { "keys": ["super+alt+i"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Transform Word - Italic.sublime-macro"}, "context":
|
260 | 206 | [
|
261 |
| - { "key": "setting.mde.italic_marker_asterisk", "operator": "equal", "operand": false }, |
262 | 207 | { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
263 | 208 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
264 | 209 | ]
|
265 | 210 | },
|
266 |
| - { "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "*$0$*"}, "context": |
| 211 | + { "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "${MD_ITALIC_MARKER}$0${MD_ITALIC_MARKER}"}, "context": |
267 | 212 | [
|
268 |
| - { "key": "setting.mde.italic_marker_asterisk", "operator": "equal", "operand": true }, |
269 | 213 | { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
270 | 214 | { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true },
|
271 | 215 | { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true },
|
|
274 | 218 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
275 | 219 | ]
|
276 | 220 | },
|
277 |
| - { "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "_$0$_"}, "context": |
278 |
| - [ |
279 |
| - { "key": "setting.mde.italic_marker_asterisk", "operator": "equal", "operand": false }, |
280 |
| - { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |
281 |
| - { "key": "selection_empty", "operator": "equal", "operand": true, "match_all": true }, |
282 |
| - { "key": "following_text", "operator": "regex_contains", "operand": "^(?:\t| |\\)|]|\\}|$)", "match_all": true }, |
283 |
| - { "key": "preceding_text", "operator": "not_regex_contains", "operand": "['a-zA-Z0-9_]$", "match_all": true }, |
284 |
| - { "key": "eol_selector", "operator": "not_equal", "operand": "string.quoted.single", "match_all": true }, |
285 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } |
286 |
| - ] |
287 |
| - }, |
288 |
| - { "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "*${SELECTION/(^[\\*_]*|[\\*_]*$)//g}*"}, "context": |
289 |
| - [ |
290 |
| - { "key": "setting.mde.italic_marker_asterisk", "operator": "equal", "operand": true }, |
291 |
| - { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true }, |
292 |
| - { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true }, |
293 |
| - { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true } |
294 |
| - ] |
295 |
| - }, |
296 |
| - { "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "_${SELECTION/(^[\\*_]*|[\\*_]*$)//g}_"}, "context": |
| 221 | + { "keys": ["super+alt+i"], "command": "insert_snippet", "args": {"contents": "${MD_ITALIC_MARKER}${SELECTION/(^[\\*_]*|[\\*_]*$)//g}${MD_ITALIC_MARKER}"}, "context": |
297 | 222 | [
|
298 |
| - { "key": "setting.mde.italic_marker_asterisk", "operator": "equal", "operand": false }, |
299 | 223 | { "key": "setting.auto_match_enabled", "operator": "equal", "operand": true },
|
300 | 224 | { "key": "selection_empty", "operator": "equal", "operand": false, "match_all": true },
|
301 | 225 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown", "match_all": true }
|
|
0 commit comments