diff --git a/Default (Linux).sublime-keymap b/Default (Linux).sublime-keymap index 27e241fd..712cdc9d 100644 --- a/Default (Linux).sublime-keymap +++ b/Default (Linux).sublime-keymap @@ -789,12 +789,14 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } ] }, @@ -802,12 +804,14 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } ] }, @@ -815,6 +819,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -822,6 +827,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -829,6 +835,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -836,6 +843,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -844,6 +852,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -851,6 +860,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -858,6 +868,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -865,6 +876,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -873,6 +885,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -880,6 +893,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -887,6 +901,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -894,6 +909,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -902,6 +918,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -910,6 +927,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -918,6 +936,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -926,6 +945,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -934,6 +954,7 @@ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s?$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true } ] diff --git a/Default (OSX).sublime-keymap b/Default (OSX).sublime-keymap index 335869c0..92e23afd 100644 --- a/Default (OSX).sublime-keymap +++ b/Default (OSX).sublime-keymap @@ -789,12 +789,14 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } ] }, @@ -802,12 +804,14 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } ] }, @@ -815,6 +819,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -822,6 +827,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -829,6 +835,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -836,6 +843,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -844,6 +852,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -851,6 +860,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -858,6 +868,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -865,6 +876,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -873,6 +885,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -880,6 +893,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -887,6 +901,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -894,6 +909,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -902,6 +918,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -910,6 +927,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -918,6 +936,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -926,6 +945,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -934,6 +954,7 @@ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s?$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true } ] diff --git a/Default (Windows).sublime-keymap b/Default (Windows).sublime-keymap index 27e241fd..712cdc9d 100644 --- a/Default (Windows).sublime-keymap +++ b/Default (Windows).sublime-keymap @@ -789,12 +789,14 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true } ] }, @@ -802,12 +804,14 @@ { "keys": ["shift+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } ] }, { "keys": ["shift+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*)([-+*])(\\s+).*/\n$1 $3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true } ] }, @@ -815,6 +819,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -822,6 +827,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -829,6 +835,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -836,6 +843,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -844,6 +852,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -851,6 +860,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -858,6 +868,7 @@ { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -865,6 +876,7 @@ { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)\\[[ xX]\\](\\s+)).*/\n$1$2$3[ ]$4/}"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^([\\s>]*([-+*])\\s+)\\[[ xX]\\](?:\\s+\\S|\\s*$)", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -873,6 +885,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -880,6 +893,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } ] @@ -887,6 +901,7 @@ { "keys": ["enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -894,6 +909,7 @@ { "keys": ["keypad_enter"], "command": "mde_number_list", "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*\\d+[.)]", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } ] @@ -902,6 +918,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -910,6 +927,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "auto_complete_visible", "operator": "equal", "operand": false } @@ -918,6 +936,7 @@ { "keys": ["enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -926,6 +945,7 @@ { "keys": ["keypad_enter"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s*$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true }, { "key": "setting.auto_complete_commit_on_tab" } @@ -934,6 +954,7 @@ { "keys": ["backspace"], "command": "run_macro_file", "args": {"file": "Packages/MarkdownEditing/macros/Delete Empty List Item.sublime-macro"}, "context": [ { "key": "selector", "operator": "equal", "operand": "text.html.markdown - meta.frontmatter - meta.disable-markdown - markup.raw", "match_all": true }, + { "key": "setting.mde.list_auto_bullets", "operator": "equal", "operand": true }, { "key": "preceding_text", "operator": "regex_match", "operand": "^[\\s>]*([-+*]|\\d+[.)])(?:\\s+\\[[ xX]\\])?\\s?$", "match_all": true }, { "key": "following_text", "operator": "regex_match", "operand": "^\\s*$", "match_all": true } ] diff --git a/Preferences.sublime-settings b/Preferences.sublime-settings index 5bc53296..250b27d5 100644 --- a/Preferences.sublime-settings +++ b/Preferences.sublime-settings @@ -40,6 +40,22 @@ // Adds after list items instead of a single . "mde.list_align_text": false, + // MarkdownEditing (Lists): + // Automatically insert or remove list item bullets while writing. + "mde.list_auto_bullets": true, + + // MarkdownEditing (Lists): + // Automatically switches list bullet when indenting blank list item with . + "mde.list_indent_auto_switch_bullet": false, + + // MarkdownEditing (Lists): + // List bullets to be used for automatically switching. In their order. + "mde.list_indent_bullets": ["*", "-", "+"], + + // MarkdownEditing (Lists): + // Auto increments ordered list number. Set to false if you want always "1". + "mde.auto_increment_ordered_list_number": true, + // MarkdownEditing (References): // The sorting method used by the Organize References command. // Should be one of @@ -50,19 +66,7 @@ "mde.ref_organize_sort": "reference_order", "mde.ref_organize_sort_reverse": false, - // MarkdownEditing: - // Automatically switches list bullet when indenting blank list item with . - "mde.list_indent_auto_switch_bullet": true, - - // MarkdownEditing: - // List bullets to be used for automatically switching. In their order. - "mde.list_indent_bullets": ["*", "-", "+"], - - // MarkdownEditing: - // Auto increments ordered list number. Set to false if you want always "1". - "mde.auto_increment_ordered_list_number": true, - - // MarkdownEditing: + // MarkdownEditing (Linting): "mde.lint": { "mdl": { // By default it is mdl.bat on windows and mdl otherwise. Leave it blank to use the default value diff --git a/messages.json b/messages.json index dec85922..b31e0c3d 100644 --- a/messages.json +++ b/messages.json @@ -45,5 +45,6 @@ "3.1.8": "messages/3.1.8.md", "3.1.9": "messages/3.1.9.md", "3.1.10": "messages/3.1.10.md", - "3.1.11": "messages/3.1.11.md" + "3.1.11": "messages/3.1.11.md", + "3.1.12": "messages/3.1.12.md" } diff --git a/messages/3.1.12.md b/messages/3.1.12.md new file mode 100644 index 00000000..cec10a17 --- /dev/null +++ b/messages/3.1.12.md @@ -0,0 +1,19 @@ +# MarkdownEditing 3.1.12 Changelog + +Your _MarkdownEditing_ plugin is updated. Enjoy new version. For any type of +feedback you can use [GitHub issues][issues]. + +## Bug Fixes + +- fix AutoHotKey scopes and context names +- unfold links if `mde.auto_fold_link.enabled` is set false (fixes #742) + +## New Features + +- syntax highlighting for TOML frontmatters (closes #736) +- syntax highlighting and snippets for Github Alerts (closes #743) +- allow disabling list bullet auto insertion/removal (closes #744) + +## Changes + +[issues]: https://github.com/SublimeText-Markdown/MarkdownEditing/issues diff --git a/plugins/folding.py b/plugins/folding.py index ac6060a1..a97af3d0 100644 --- a/plugins/folding.py +++ b/plugins/folding.py @@ -400,32 +400,33 @@ class MdeFoldLinksListener(MdeViewEventListener): This class describes an automatic link folding event listener. """ - @classmethod - def is_applicable(cls, settings): - return MdeViewEventListener.is_applicable(settings) and settings.get( - "mde.auto_fold_link.enabled", True - ) + def auto_fold(self): + settings = self.view.settings() + if settings.get("mde.auto_fold_link.enabled", True): + fold_urls(self.view) + else: + unfold_urls(self.view) def on_init(self): """ Fold all links after application startup. """ - fold_urls(self.view) + self.auto_fold() def on_load(self): """ Fold all links once file is loaded. """ - fold_urls(self.view) + self.auto_fold() def on_activated(self): """ Update link folding when activating view. """ - fold_urls(self.view) + self.auto_fold() def on_selection_modified(self): """ Update link folding when moving caret around. """ - fold_urls(self.view) + self.auto_fold() diff --git a/snippets/Github Caution.sublime-snippet b/snippets/Github Caution.sublime-snippet new file mode 100644 index 00000000..71ba0a51 --- /dev/null +++ b/snippets/Github Caution.sublime-snippet @@ -0,0 +1,9 @@ + + [!CAUTION] +> +> ${0:enter text} +]]> + ghcaution + text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw + Github Alert + diff --git a/snippets/Github Important.sublime-snippet b/snippets/Github Important.sublime-snippet new file mode 100644 index 00000000..ac09f81e --- /dev/null +++ b/snippets/Github Important.sublime-snippet @@ -0,0 +1,9 @@ + + [!IMPORTANT] +> +> ${0:enter text} +]]> + ghimportant + text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw + Github Alert + diff --git a/snippets/Github Note.sublime-snippet b/snippets/Github Note.sublime-snippet index 963c6e39..e8a2894c 100644 --- a/snippets/Github Note.sublime-snippet +++ b/snippets/Github Note.sublime-snippet @@ -1,9 +1,9 @@ - **Note** + [!NOTE] > > ${0:enter text} ]]> ghnote text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - Markdown Admonition + Github Alert diff --git a/snippets/Github Tip.sublime-snippet b/snippets/Github Tip.sublime-snippet new file mode 100644 index 00000000..3129678a --- /dev/null +++ b/snippets/Github Tip.sublime-snippet @@ -0,0 +1,9 @@ + + [!TIP] +> +> ${0:enter text} +]]> + ghtip + text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw + Github Alert + diff --git a/snippets/Github Warning.sublime-snippet b/snippets/Github Warning.sublime-snippet index c9979d9f..833cf4bd 100644 --- a/snippets/Github Warning.sublime-snippet +++ b/snippets/Github Warning.sublime-snippet @@ -1,9 +1,9 @@ - **Warning** + [!WARNING] > > ${0:enter text} ]]> ghwarn text.html.markdown - meta.frontmatter - meta.disable-markdown - meta.code-fence - markup.raw - Markdown Admonition + Github Alert diff --git a/syntaxes/Markdown.sublime-syntax b/syntaxes/Markdown.sublime-syntax index d0cab96d..3fb1fe31 100644 --- a/syntaxes/Markdown.sublime-syntax +++ b/syntaxes/Markdown.sublime-syntax @@ -335,6 +335,16 @@ contexts: escape_captures: 0: meta.frontmatter.markdown 1: punctuation.section.block.end.frontmatter.markdown + - match: (\+{3})\s*\n + captures: + 0: meta.frontmatter.markdown + 1: punctuation.section.block.begin.frontmatter.markdown + embed: scope:source.toml + embed_scope: meta.frontmatter.markdown source.toml.embedded.markdown + escape: ^(\+{3})\s*\n + escape_captures: + 0: meta.frontmatter.markdown + 1: punctuation.section.block.end.frontmatter.markdown markdown: - include: indented-code-blocks @@ -359,6 +369,56 @@ contexts: block-quotes: # https://spec.commonmark.org/0.30/#block-quotes + - match: '[ \t]{,3}(>)[ ]?((\[)!CAUTION(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.caution.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-caution-meta + - block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.warning.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-warning-meta + - block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.important.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-important-meta + - block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.note.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-note-meta + - block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.tip.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-tip-meta + - block-quote-body + - block-quote-punctuation-body - match: '[ \t]{,3}(>)[ ]?' captures: 1: punctuation.definition.blockquote.markdown @@ -367,6 +427,31 @@ contexts: - block-quote-body - block-quote-punctuation-body + block-quote-caution-meta: + - meta_include_prototype: false + - meta_scope: markup.quote.alert.caution.markdown + - include: immediately-pop + + block-quote-warning-meta: + - meta_include_prototype: false + - meta_scope: markup.quote.alert.warning.markdown + - include: immediately-pop + + block-quote-important-meta: + - meta_include_prototype: false + - meta_scope: markup.quote.alert.important.markdown + - include: immediately-pop + + block-quote-note-meta: + - meta_include_prototype: false + - meta_scope: markup.quote.alert.note.markdown + - include: immediately-pop + + block-quote-tip-meta: + - meta_include_prototype: false + - meta_scope: markup.quote.alert.tip.markdown + - include: immediately-pop + block-quote-meta: - meta_include_prototype: false - meta_scope: markup.quote.markdown @@ -714,6 +799,56 @@ contexts: 4: markup.list.numbered.markdown list-block-quotes: + - match: '[ \t]{,3}(>)[ ]?((\[)!CAUTION(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.caution.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-caution-meta + - list-block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!WARNING(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.warning.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-warning-meta + - list-block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!IMPORTANT(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.important.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-important-meta + - list-block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!NOTE(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.note.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-note-meta + - list-block-quote-body + - block-quote-punctuation-body + - match: '[ \t]{,3}(>)[ ]?((\[)!TIP(\]))' + captures: + 1: punctuation.definition.blockquote.markdown + 2: markup.heading.alert.tip.markdown + 3: punctuation.definition.heading.begin.markdown + 4: punctuation.definition.heading.end.markdown + push: + - block-quote-tip-meta + - list-block-quote-body + - block-quote-punctuation-body - match: '[ \t]*(>)[ ]?' captures: 1: punctuation.definition.blockquote.markdown @@ -1019,7 +1154,7 @@ contexts: - include: fenced-yaml # 3rd-party syntaxes - include: fenced-ada - - include: fenced-akh + - include: fenced-ahk - include: fenced-arduino - include: fenced-coffee - include: fenced-dart @@ -2019,25 +2154,25 @@ contexts: 1: punctuation.definition.raw.code-fence.end.markdown 2: meta.fold.code-fence.end.markdown - fenced-akh: + fenced-ahk: - match: |- (?x) {{fenced_code_block_start}} - (?i:\s*(akh)) + (?i:\s*(ahk)) {{fenced_code_block_trailing_infostring_characters}} captures: - 0: meta.code-fence.definition.begin.akh.markdown-gfm + 0: meta.code-fence.definition.begin.ahk.markdown-gfm 2: punctuation.definition.raw.code-fence.begin.markdown 5: constant.other.language-name.markdown 6: comment.line.infostring.markdown 7: meta.fold.code-fence.begin.markdown - embed: scope:source.akh + embed: scope:source.ahk embed_scope: - markup.raw.code-fence.akh.markdown-gfm - source.akh + markup.raw.code-fence.ahk.markdown-gfm + source.ahk escape: '{{fenced_code_block_escape}}' escape_captures: - 0: meta.code-fence.definition.end.akh.markdown-gfm + 0: meta.code-fence.definition.end.ahk.markdown-gfm 1: punctuation.definition.raw.code-fence.end.markdown 2: meta.fold.code-fence.end.markdown diff --git a/syntaxes/Symbol List - Heading.tmPreferences b/syntaxes/Symbol List - Heading.tmPreferences index 027966a3..b5618f77 100644 --- a/syntaxes/Symbol List - Heading.tmPreferences +++ b/syntaxes/Symbol List - Heading.tmPreferences @@ -2,7 +2,7 @@ scope - text.html.markdown markup.heading - meta.whitespace.newline + text.html.markdown markup.heading - markup.quote - meta.whitespace.newline settings showInSymbolList diff --git a/tests/syntax_test_markdown.md b/tests/syntax_test_markdown.md index 9e03cd2c..0095a86e 100644 --- a/tests/syntax_test_markdown.md +++ b/tests/syntax_test_markdown.md @@ -8192,6 +8192,153 @@ This is a [[wiki link]]. | ^^ punctuation.definition.link.begin.markdown | ^^ punctuation.definition.link.end.markdown +# TEST: GITHUB ALERTS ######################################################### + +> [!CAUTION] +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^^^^ markup.quote.alert.caution.markdown +| ^^^^^^^^^^ markup.heading.alert.caution.markdown +| ^ punctuation.definition.heading.begin.markdown +| ^ punctuation.definition.heading.end.markdown + +> [!CAUTION] +> +> Text +| <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.caution.markdown - markup.paragraph +| ^^^^^ markup.quote.alert.caution.markdown markup.paragraph.markdown + +> [!WARNING] +| <- markup.quote.alert.warning.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^^^^ markup.quote.alert.warning.markdown +| ^^^^^^^^^^ markup.heading.alert.warning.markdown +| ^ punctuation.definition.heading.begin.markdown +| ^ punctuation.definition.heading.end.markdown + +> [!WARNING] +> +> Text +| <- markup.quote.alert.warning.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.warning.markdown - markup.paragraph +| ^^^^^ markup.quote.alert.warning.markdown markup.paragraph.markdown + +> [!IMPORTANT] +| <- markup.quote.alert.important.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^^^^^^ markup.quote.alert.important.markdown +| ^^^^^^^^^^^^ markup.heading.alert.important.markdown +| ^ punctuation.definition.heading.begin.markdown +| ^ punctuation.definition.heading.end.markdown + +> [!IMPORTANT] +> +> Text +| <- markup.quote.alert.important.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.important.markdown - markup.paragraph +| ^^^^^ markup.quote.alert.important.markdown markup.paragraph.markdown + +> [!NOTE] +| <- markup.quote.alert.note.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^^ markup.quote.alert.note.markdown +| ^^^^^^^ markup.heading.alert.note.markdown +| ^ punctuation.definition.heading.begin.markdown +| ^ punctuation.definition.heading.end.markdown + +> [!NOTE] +> +> Text +| <- markup.quote.alert.note.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.note.markdown - markup.paragraph +| ^^^^^ markup.quote.alert.note.markdown markup.paragraph.markdown + +> [!TIP] +| <- markup.quote.alert.tip.markdown punctuation.definition.blockquote.markdown +|^^^^^^^^ markup.quote.alert.tip.markdown +| ^^^^^^ markup.heading.alert.tip.markdown +| ^ punctuation.definition.heading.begin.markdown +| ^ punctuation.definition.heading.end.markdown + +> [!TIP] +> +> Text +| <- markup.quote.alert.tip.markdown punctuation.definition.blockquote.markdown +|^ markup.quote.alert.tip.markdown - markup.paragraph +| ^^^^^ markup.quote.alert.tip.markdown markup.paragraph.markdown + + +1. list item + > [!CAUTION] + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^^^^ markup.quote.alert.caution.markdown + | ^^^^^^^^^^ markup.heading.alert.caution.markdown + | ^ punctuation.definition.heading.begin.markdown + | ^ punctuation.definition.heading.end.markdown + + > [!CAUTION] + > + > Text + | <- markup.quote.alert.caution.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.caution.markdown - markup.paragraph + | ^^^^^ markup.quote.alert.caution.markdown markup.paragraph.markdown + +1. list item + > [!WARNING] + | <- markup.quote.alert.warning.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^^^^ markup.quote.alert.warning.markdown + | ^^^^^^^^^^ markup.heading.alert.warning.markdown + | ^ punctuation.definition.heading.begin.markdown + | ^ punctuation.definition.heading.end.markdown + + > [!WARNING] + > + > Text + | <- markup.quote.alert.warning.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.warning.markdown - markup.paragraph + | ^^^^^ markup.quote.alert.warning.markdown markup.paragraph.markdown + +1. list item + > [!IMPORTANT] + | <- markup.quote.alert.important.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^^^^^^ markup.quote.alert.important.markdown + | ^^^^^^^^^^^^ markup.heading.alert.important.markdown + | ^ punctuation.definition.heading.begin.markdown + | ^ punctuation.definition.heading.end.markdown + + > [!IMPORTANT] + > + > Text + | <- markup.quote.alert.important.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.important.markdown - markup.paragraph + | ^^^^^ markup.quote.alert.important.markdown markup.paragraph.markdown + +1. list item + > [!NOTE] + | <- markup.quote.alert.note.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^^ markup.quote.alert.note.markdown + | ^^^^^^^ markup.heading.alert.note.markdown + | ^ punctuation.definition.heading.begin.markdown + | ^ punctuation.definition.heading.end.markdown + + > [!NOTE] + > + > Text + | <- markup.quote.alert.note.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.note.markdown - markup.paragraph + | ^^^^^ markup.quote.alert.note.markdown markup.paragraph.markdown + +1. list item + > [!TIP] + | <- markup.quote.alert.tip.markdown punctuation.definition.blockquote.markdown + |^^^^^^^^ markup.quote.alert.tip.markdown + | ^^^^^^ markup.heading.alert.tip.markdown + | ^ punctuation.definition.heading.begin.markdown + | ^ punctuation.definition.heading.end.markdown + + > [!TIP] + > + > Text + | <- markup.quote.alert.tip.markdown punctuation.definition.blockquote.markdown + |^ markup.quote.alert.tip.markdown - markup.paragraph + | ^^^^^ markup.quote.alert.tip.markdown markup.paragraph.markdown # TEST: MATHJAX BLOCKS MARKUP #################################################