|
848 | 848 | { "key": "preceding_text", "operator": "regex_contains", "operand": "^[\\s>]*[-+*][ ]\\[[ xX]\\]\\s+(?:\\S|$)", "match_all": true } |
849 | 849 | ] |
850 | 850 | }, |
| 851 | + // Terminate lists (also in block quotes) |
| 852 | + { "keys": ["super+enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*).*/\n$1\n$1/}"}, "context": |
| 853 | + [ |
| 854 | + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.list", "match_all": true }, |
| 855 | + ] |
| 856 | + }, |
| 857 | + { "keys": ["super+keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)*).*/\n$1\n$1/}"}, "context": |
| 858 | + [ |
| 859 | + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.list", "match_all": true }, |
| 860 | + ] |
| 861 | + }, |
851 | 862 | // Extend lists (also in block quotes) |
852 | 863 | { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^(?:\\s*((?:>\\s*)*)([-+*])(\\s+)).*/\n$1$2$3/}"}, "context": |
853 | 864 | [ |
|
1134 | 1145 | { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)+).*/\n$1/}"}, "context": |
1135 | 1146 | [ |
1136 | 1147 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote", "match_all": true }, |
1137 | | - { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:>\\s*)+(?![-+*>#\\s]|\\d+[.)])", "match_all": true }, |
| 1148 | + { "key": "preceding_text", "operator": "not_regex_contains", "operand": "^\\s*(?:>\\s*)+(?:[-+*#]\\s|\\d+[.)])", "match_all": true }, |
1138 | 1149 | { "key": "auto_complete_visible", "operator": "equal", "operand": false } |
1139 | 1150 | ] |
1140 | 1151 | }, |
1141 | 1152 | { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)+).*/\n$1/}"}, "context": |
1142 | 1153 | [ |
1143 | 1154 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote", "match_all": true }, |
1144 | | - { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:>\\s*)+(?![-+*>#\\s]|\\d+[.)])", "match_all": true }, |
| 1155 | + { "key": "preceding_text", "operator": "not_regex_contains", "operand": "^\\s*(?:>\\s*)+(?:[-+*#]\\s|\\d+[.)])", "match_all": true }, |
1145 | 1156 | { "key": "auto_complete_visible", "operator": "equal", "operand": false } |
1146 | 1157 | ] |
1147 | 1158 | }, |
1148 | 1159 | { "keys": ["enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)+).*/\n$1/}"}, "context": |
1149 | 1160 | [ |
1150 | 1161 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote", "match_all": true }, |
1151 | | - { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:>\\s*)+(?![-+*>#\\s]|\\d+[.)])", "match_all": true }, |
| 1162 | + { "key": "preceding_text", "operator": "not_regex_contains", "operand": "^\\s*(?:>\\s*)+(?:[-+*#]\\s|\\d+[.)])", "match_all": true }, |
1152 | 1163 | { "key": "setting.auto_complete_commit_on_tab" } |
1153 | 1164 | ] |
1154 | 1165 | }, |
1155 | 1166 | { "keys": ["keypad_enter"], "command": "insert_snippet", "args": {"contents": "${TM_CURRENT_LINE/^\\s*((?:>\\s*)+).*/\n$1/}"}, "context": |
1156 | 1167 | [ |
1157 | 1168 | { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote", "match_all": true }, |
1158 | | - { "key": "preceding_text", "operator": "regex_contains", "operand": "^\\s*(?:>\\s*)+(?![-+*>#\\s]|\\d+[.)])", "match_all": true }, |
| 1169 | + { "key": "preceding_text", "operator": "not_regex_contains", "operand": "^\\s*(?:>\\s*)+(?:[-+*#]\\s|\\d+[.)])", "match_all": true }, |
1159 | 1170 | { "key": "setting.auto_complete_commit_on_tab" } |
1160 | 1171 | ] |
1161 | 1172 | }, |
1162 | 1173 | // Terminate blockquote |
1163 | 1174 | { "keys": ["super+enter"], "command": "insert_snippet", "args": {"contents": "\n\n"}, "context": |
1164 | 1175 | [ |
1165 | | - { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote", "match_all": true } |
| 1176 | + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote - text.html.markdown markup.list", "match_all": true } |
1166 | 1177 | ] |
1167 | 1178 | }, |
1168 | 1179 | { "keys": ["super+keypad_enter"], "command": "insert_snippet", "args": {"contents": "\n\n"}, "context": |
1169 | 1180 | [ |
1170 | | - { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote", "match_all": true } |
| 1181 | + { "key": "selector", "operator": "equal", "operand": "text.html.markdown markup.quote - text.html.markdown markup.list", "match_all": true } |
1171 | 1182 | ] |
1172 | 1183 | }, |
1173 | 1184 | // Terminate empty blockquote |
|
0 commit comments