From 020a4e635ea2c7681a27600132f9c6610056d08e Mon Sep 17 00:00:00 2001 From: Jonathan Chambers Date: Thu, 30 Jan 2014 11:04:15 +0000 Subject: [PATCH] AcademicMarkdown extensions to MarkdownEditing ST3 plugin --- AcademicMarkdown.sublime-settings | 55 + AcademicMarkdown.tmLanguage | 1998 +++++++++++++++++++++++++++++ AcademicMarkdownEditor.tmTheme | 1073 ++++++++++++++++ README.md | 5 + 4 files changed, 3131 insertions(+) create mode 100755 AcademicMarkdown.sublime-settings create mode 100755 AcademicMarkdown.tmLanguage create mode 100755 AcademicMarkdownEditor.tmTheme create mode 100644 README.md diff --git a/AcademicMarkdown.sublime-settings b/AcademicMarkdown.sublime-settings new file mode 100755 index 0000000..e986a87 --- /dev/null +++ b/AcademicMarkdown.sublime-settings @@ -0,0 +1,55 @@ +{ + "extensions": + [ + "md" + ], + + "color_scheme": "Packages/AcademicMarkdown/AcademicMarkdownEditor.tmTheme", + // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Dark.tmTheme", + // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Yellow.tmTheme", + + // This is a quick and dirty focus theme. In order to make it work, you've to + // set `"highlight_line": true,` in this settings file. It is likely that there will + // be more mature focus improvements in the future (maybe similar to iA Writer). + // "color_scheme": "Packages/MarkdownEditing/MarkdownEditor-Focus.tmTheme", + + "tab_size": 4, + "translate_tabs_to_spaces": true, + "trim_trailing_white_space_on_save": false, + "auto_match_enabled": true, + + // Layout + "draw_centered": true, + "word_wrap": true, + "wrap_width": 80, + "rulers": [], + + // Line + "line_numbers": false, + "highlight_line": false, + "line_padding_top": 2, + "line_padding_bottom": 2, + + // Caret + "caret_style": "wide", + "caret_extra_top": 3, + "caret_extra_bottom": 3, + + // add trailing #'s to headlines + "mde.match_header_hashes": false, + + // Automatically switches list bullet when indenting blank list item with . + "mde.list_indent_auto_switch_bullet": true, + + // List bullets to be used for automatically switching. In their order. + "mde.list_indent_bullets": ["*", "-", "+"], + + // Allways keep current line vertically centered. + "mde.keep_centered": false, + + // Distraction free mode improvements. In order these to work, you have to install + // FullScreenStatus plugin: https://github.com/maliayas/SublimeText_FullScreenStatus + "mde.distraction_free_mode": { + "mde.keep_centered": true + } +} diff --git a/AcademicMarkdown.tmLanguage b/AcademicMarkdown.tmLanguage new file mode 100755 index 0000000..78ee99d --- /dev/null +++ b/AcademicMarkdown.tmLanguage @@ -0,0 +1,1998 @@ + + + + + firstLineMatch + ^Format:\s*(?i:complete)\s*$ + foldingStartMarker + (?x) + (<(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)\b.*?> + |<!--(?!.*-->) + |\{\s*($|\?>\s*$|//|/\*(.*\*/\s*$|(?!.*?\*/))) + ) + foldingStopMarker + (?x) + (</(?i:head|body|table|thead|tbody|tfoot|tr|div|select|fieldset|style|script|ul|ol|form|dl)> + |^\s*--> + |(^|\s)\} + ) + keyEquivalent + ^~M + name + AcademicMarkdown + patterns + + + include + #citekeys + + + include + #critic-addition + + + include + #critic-substitution + + + include + #critic-highlight + + + include + #critic-deletion + + + include + #critic-comment + + + + + + begin + ^([A-Za-z0-9]+)(:)\s* + beginCaptures + + 1 + + name + keyword.other.multimarkdown + + 2 + + name + punctuation.separator.key-value.multimarkdown + + + end + ^$|^(?=[A-Za-z0-9]+:) + name + meta.header.multimarkdown + patterns + + + comment + The reason for not setting scopeName = "string.unquoted" + (for the parent rule) is that we do not want + newlines to be marked as string.unquoted + match + .+ + name + string.unquoted.multimarkdown + + + + + + + + + + + + + begin + (?x)^ + (?= [ ]{,3}> + | ([ ]{4}|\t)(?!$) + | [#]{1,6}\s*+ + | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ + ) + comment + + We could also use an empty end match and set + applyEndPatternLast, but then we must be sure that the begin + pattern will only match stuff matched by the sub-patterns. + + end + (?x)^ + (?! [ ]{,3}> + | ([ ]{4}|\t) + | [#]{1,6}\s*+ + | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ + ) + name + meta.block-level.markdown + patterns + + + include + #block_quote + + + include + #block_raw + + + include + #heading + + + include + #separator + + + + + begin + ^[ ]{0,3}([*+-])(?=\s) + captures + + 1 + + name + punctuation.definition.list_item.markdown + + + end + ^(?=\S) + name + markup.list.unnumbered.markdown + patterns + + + include + #fenced-code-blocks + + + include + #list-paragraph + + + + + begin + ^[ ]{0,3}([0-9]+)(\.)(?=\s) + captures + + 1 + + name + punctuation.definition.list_item.markdown punctuation.definition.list_item.number.markdown + + 2 + + name + punctuation.definition.list_item.markdown + + + end + ^(?=\S) + name + markup.list.numbered.markdown + patterns + + + include + #fenced-code-blocks + + + include + #list-paragraph + + + + + include + #fenced-code-blocks + + + begin + ^(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^>]*>)(?!.*?</\1>) + comment + + Markdown formatting is disabled inside block-level tags. + + end + (?<=^</\1>$\n) + patterns + + + include + #tag-kbd + + + include + text.html.basic + + + name + meta.disable-markdown + + + begin + ^(?=<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^>]*>) + comment + Same rule but for one line disables. + end + $\n? + patterns + + + include + #tag-kbd + + + include + text.html.basic + + + name + meta.disable-markdown + + + captures + + 1 + + name + punctuation.definition.constant.markdown + + 10 + + name + punctuation.definition.string.end.markdown + + 11 + + name + string.other.link.description.title.markdown + + 12 + + name + punctuation.definition.string.begin.markdown + + 13 + + name + punctuation.definition.string.end.markdown + + 2 + + name + constant.other.reference.link.markdown + + 3 + + name + punctuation.definition.constant.markdown + + 4 + + name + punctuation.separator.key-value.markdown + + 5 + + name + punctuation.definition.link.markdown + + 6 + + name + markup.underline.link.markdown + + 7 + + name + punctuation.definition.link.markdown + + 8 + + name + string.other.link.description.title.markdown + + 9 + + name + punctuation.definition.string.begin.markdown + + + match + (?x: + \s* # Leading whitespace + (\[)(.+?)(\])(:) # Reference name + [ \t]* # Optional whitespace + (<?)(\S+?)(>?) # The url + [ \t]* # Optional whitespace + (?: + ((\().+?(\))) # Match title in quotes… + | ((").+?(")) # or in parens. + )? # Title is optional + [ \t]* # Optional whitespace + $ + ) + name + meta.link.reference.def.markdown + + + begin + ^(?=\S)(?![=-]{3,}(?=$)) + end + ^(?:\s*$|(?=[ ]{,3}>)|(?=```|~~~))|(?=[ \t]*\n)(?<=^===|^====|=====|^---|^----|-----)[ \t]*\n|(?=^#) + name + meta.paragraph.markdown + patterns + + + include + #inline + + + include + text.html.basic + + + captures + + 1 + + name + punctuation.definition.heading.markdown + + + match + ^(={3,})(?=[ \t]*$) + name + markup.heading.1.markdown + + + captures + + 1 + + name + punctuation.definition.heading.markdown + + + match + ^(-{3,})(?=[ \t]*$) + name + markup.heading.2.markdown + + + + + + repository + + + critic-substitution + + comment + Editorial Substitution + match + \{~~(.*?)~~\} + name + criticmarkup.substitution + + critic-addition + + comment + Editorial Addition + match + \{\+\+(.*?)\+\+[ \t]*(\[(.*?)\])?[ \t]*\} + name + criticmarkup.addition + + critic-deletion + + comment + Editorial Deletion + match + \{\-\-(.*?)\-\-[ \t]*(\[(.*?)\])?[ \t]*\} + name + criticmarkup.deletion + + critic-highlight + + highlight + Editorial Highlight + match + \{\{(.*?)[ \t]*(\[(.*?)\])?[ \t]*\}\} + name + criticmarkup.highlight + + critic-comment + + comment + Editorial Mark + begin + \{>> + end + <<\} + name + criticmarkup.comment + + + + citekeys + + comment + This should highlight citekeys and @refs + match + @\w+ + name + string.other.link.description.title.markdown + + + ampersand + + comment + + Markdown will convert this for us. We match it so that the + HTML grammar will not mark it up as invalid. + + match + &(?!([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+);) + name + meta.other.valid-ampersand.markdown + + block_quote + + begin + \G[ ]{,3}(>)[ ]? + beginCaptures + + 1 + + name + punctuation.definition.blockquote.markdown + + + comment + + We terminate the block quote when seeing an empty line, a + separator or a line with leading > characters. The latter is + to “reset” the quote level for quoted lines. + + end + (?x)^ + (?= \s*$ + | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ + | [ ]{,3}> + ) + name + markup.quote.markdown + patterns + + + begin + (?x)\G + (?= [ ]{,3}> + ) + end + ^ + patterns + + + include + #block_quote + + + + + applyEndPatternLast + 1 + begin + (?x)\G + (?= ([ ]{4}|\t) + | [#]{1,6}\s*+ + | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ + ) + end + ^ + patterns + + + include + #block_raw + + + include + #heading + + + include + #separator + + + + + begin + (?x)\G + (?! $ + | [ ]{,3}> + | ([ ]{4}|\t) + | [#]{1,6}\s*+ + | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ + ) + end + $|(?<=\n) + patterns + + + include + #inline + + + include + text.html.basic + + + + + + block_raw + + match + \G([ ]{4}|\t).*$\n? + name + markup.raw.block.markdown + + bold + + begin + (?x) + (?<!\w)(\*\*|__)(?=\S) # Open + (?= + ( + <[^>]*+> # HTML tags + | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> + # Raw + | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes + | \[ + ( + (?<square> # Named group + [^\[\]\\] # Match most chars + | \\. # Escaped chars + | \[ \g<square>*+ \] # Nested brackets + )*+ + \] + ( + ( # Reference Link + [ ]? # Optional space + \[[^\]]*+\] # Ref name + ) + | ( # Inline Link + \( # Opening paren + [ \t]*+ # Optional whtiespace + <?(.*?)>? # URL + [ \t]*+ # Optional whtiespace + ( # Optional Title + (?<title>['"]) + (.*?) + \k<title> + )? + \) + ) + ) + ) + | (?!(?<=\S)\1). # Everything besides + # style closer + )++ + (?<=\S)\1 # Close + ) + + captures + + 1 + + name + punctuation.definition.bold.markdown + + + end + (?<=\S)(\1) + name + markup.bold.markdown + patterns + + + applyEndPatternLast + 1 + begin + (?=<[^>]*?>) + end + (?<=>) + patterns + + + include + #tag-kbd + + + include + text.html.basic + + + + + include + #escape + + + include + #ampersand + + + include + #bracket + + + include + #raw + + + include + #italic + + + include + #strikethrough + + + include + #image-inline + + + include + #link-inline + + + include + #link-inet + + + include + #link-email + + + include + #image-ref + + + include + #link-ref-literal + + + include + #link-ref + + + + strikethrough + + begin + (?x) + (?<!\w)(~~)(?=[^\s~]) # Open + (?= + ( + <[^>]*+> # HTML tags + | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> + # Raw + | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes + | \[ + ( + (?<square> # Named group + [^\[\]\\] # Match most chars + | \\. # Escaped chars + | \[ \g<square>*+ \] # Nested brackets + )*+ + \] + ( + ( # Reference Link + [ ]? # Optional space + \[[^\]]*+\] # Ref name + ) + | ( # Inline Link + \( # Opening paren + [ \t]*+ # Optional whtiespace + <?(.*?)>? # URL + [ \t]*+ # Optional whtiespace + ( # Optional Title + (?<title>['"]) + (.*?) + \k<title> + )? + \) + ) + ) + ) + | (?!(?<=\S)\1). # Everything besides + # style closer + )++ + ) + + captures + + 1 + + name + punctuation.definition.strikethrough.markdown + + + end + (?<=\S)(\1) + name + markup.strikethrough.markdown + patterns + + + applyEndPatternLast + 1 + begin + (?=<[^>]*?>) + end + (?<=>) + patterns + + + include + #tag-kbd + + + include + text.html.basic + + + + + include + #escape + + + include + #ampersand + + + include + #bracket + + + include + #raw + + + include + #bold + + + include + #italic + + + include + #image-inline + + + include + #link-inline + + + include + #link-inet + + + include + #link-email + + + include + #image-ref + + + include + #link-ref-literal + + + include + #link-ref + + + + bracket + + comment + + Markdown will convert this for us. We match it so that the + HTML grammar will not mark it up as invalid. + + match + <(?![a-z/?\$!]) + name + meta.other.valid-bracket.markdown + + escape + + match + \\[-`*_#+.!(){}\[\]\\>] + name + constant.character.escape.markdown + + heading + + begin + \G(#{1,6})(?!#)\s*(?=\S) + captures + + 1 + + name + punctuation.definition.heading.markdown + + + contentName + entity.name.section.markdown + end + \s*(#*)$\n? + name + markup.heading.markdown + patterns + + + include + #inline + + + + image-inline + + captures + + 1 + + name + punctuation.definition.string.begin.markdown + + 10 + + name + string.other.link.description.title.markdown + + 11 + + name + punctuation.definition.string.markdown + + 12 + + name + punctuation.definition.string.markdown + + 13 + + name + string.other.link.description.title.markdown + + 14 + + name + punctuation.definition.string.markdown + + 15 + + name + punctuation.definition.string.markdown + + 16 + + name + punctuation.definition.metadata.markdown + + 2 + + name + string.other.link.description.markdown + + 4 + + name + punctuation.definition.string.end.markdown + + 5 + + name + invalid.illegal.whitespace.markdown + + 6 + + name + punctuation.definition.metadata.markdown + + 7 + + name + punctuation.definition.link.markdown + + 8 + + name + markup.underline.link.image.markdown + + 9 + + name + punctuation.definition.link.markdown + + + match + (?x: + \! # Images start with ! + (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\]) + # Match the link text. + ([ ])? # Space not allowed + (\() # Opening paren for url + (<?)(\S+?)(>?) # The url + [ \t]* # Optional whitespace + (?: + ((\().+?(\))) # Match title in parens… + | ((").+?(")) # or in quotes. + )? # Title is optional + \s* # Optional whitespace + (\)) + ) + name + meta.image.inline.markdown + + image-ref + + captures + + 1 + + name + punctuation.definition.string.begin.markdown + + 2 + + name + string.other.link.description.markdown + + 4 + + name + punctuation.definition.string.begin.markdown + + 5 + + name + punctuation.definition.constant.markdown + + 6 + + name + constant.other.reference.link.markdown + + 7 + + name + punctuation.definition.constant.markdown + + + match + \!(\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(.*?)(\]) + name + meta.image.reference.markdown + + inline + + patterns + + + + include + #critic-addition + + + include + #critic-substitution + + + include + #critic-highlight + + + include + #critic-deletion + + + include + #critic-comment + + + include + #citekeys + + + include + #escape + + + include + #ampersand + + + include + #bracket + + + include + #raw + + + include + #bold + + + include + #italic + + + include + #strikethrough + + + include + #line-break + + + include + #image-inline + + + include + #link-inline + + + include + #link-inet + + + include + #link-email + + + include + #image-ref + + + include + #link-ref-literal + + + include + #link-ref + + + include + #tag-kbd + + + + italic + + begin + (?x) + (?<!\w)(\*|_)(?=\S) # Open + (?= + ( + <[^>]*+> # HTML tags + | (?<raw>`+)([^`]|(?!(?<!`)\k<raw>(?!`))`)*+\k<raw> + # Raw + | \\[\\`*_{}\[\]()#.!+\->]?+ # Escapes + | \[ + ( + (?<square> # Named group + [^\[\]\\] # Match most chars + | \\. # Escaped chars + | \[ \g<square>*+ \] # Nested brackets + )*+ + \] + ( + ( # Reference Link + [ ]? # Optional space + \[[^\]]*+\] # Ref name + ) + | ( # Inline Link + \( # Opening paren + [ \t]*+ # Optional whtiespace + <?(.*?)>? # URL + [ \t]*+ # Optional whtiespace + ( # Optional Title + (?<title>['"]) + (.*?) + \k<title> + )? + \) + ) + ) + ) + | \1\1 # Must be bold closer + | (?!(?<=\S)\1). # Everything besides + # style closer + )++ + (?<=\S)\1 # Close + ) + + captures + + 1 + + name + punctuation.definition.italic.markdown + + + end + (?<=\S)(\1)((?!\1)|(?=\1\1)) + name + markup.italic.markdown + patterns + + + applyEndPatternLast + 1 + begin + (?=<[^>]*?>) + end + (?<=>) + patterns + + + include + #tag-kbd + + + include + text.html.basic + + + + + include + #escape + + + include + #ampersand + + + include + #bracket + + + include + #raw + + + include + #bold + + + include + #strikethrough + + + include + #image-inline + + + include + #link-inline + + + include + #link-inet + + + include + #link-email + + + include + #image-ref + + + include + #link-ref-literal + + + include + #link-ref + + + + line-break + + match + {2,}$ + name + meta.dummy.line-break + + link-email + + captures + + 1 + + name + punctuation.definition.link.markdown + + 2 + + name + markup.underline.link.markdown + + 4 + + name + punctuation.definition.link.markdown + + + match + (<)?((?:mailto:)?[-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(>)? + name + meta.link.email.lt-gt.markdown + + link-inet + + captures + + 1 + + name + punctuation.definition.link.markdown + + 2 + + name + markup.underline.link.markdown + + 3 + + name + punctuation.definition.link.markdown + + + match + (<)?(\b(?:https?|ftp|file|git):///?[^\s()<>\[\]]+)(>)? + name + meta.link.inet.markdown + + link-inline + + captures + + 1 + + name + punctuation.definition.string.begin.markdown + + 10 + + name + string.other.link.description.title.markdown + + 11 + + name + punctuation.definition.string.begin.markdown + + 12 + + name + punctuation.definition.string.end.markdown + + 13 + + name + string.other.link.description.title.markdown + + 14 + + name + punctuation.definition.string.begin.markdown + + 15 + + name + punctuation.definition.string.end.markdown + + 16 + + name + punctuation.definition.metadata.markdown + + 2 + + name + string.other.link.title.markdown + + 4 + + name + punctuation.definition.string.end.markdown + + 5 + + name + invalid.illegal.whitespace.markdown + + 6 + + name + punctuation.definition.metadata.markdown + + 7 + + name + punctuation.definition.link.markdown + + 8 + + name + markup.underline.link.markdown + + 9 + + name + punctuation.definition.link.markdown + + + match + (?x: + (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\]) + # Match the link text. + ([ ])? # Space not allowed + (\() # Opening paren for url + (<?)(.*?)(>?) # The url + [ \t]* # Optional whitespace + (?: + ((\().+?(\))) # Match title in parens… + | ((").+?(")) # or in quotes. + )? # Title is optional + \s* # Optional whitespace + (\)) + ) + name + meta.link.inline.markdown + + link-ref + + captures + + 1 + + name + punctuation.definition.string.begin.markdown + + 2 + + name + string.other.link.title.markdown + + 4 + + name + punctuation.definition.string.end.markdown + + 5 + + name + punctuation.definition.constant.begin.markdown + + 6 + + name + constant.other.reference.link.markdown + + 7 + + name + punctuation.definition.constant.end.markdown + + + match + (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)([^\]]*+)(\]) + name + meta.link.reference.markdown + + link-ref-literal + + captures + + 1 + + name + punctuation.definition.string.begin.markdown + + 2 + + name + string.other.link.title.markdown + + 4 + + name + punctuation.definition.string.end.markdown + + 5 + + name + punctuation.definition.constant.begin.markdown + + 6 + + name + punctuation.definition.constant.end.markdown + + + match + (\[)((?<square>[^\[\]\\]|\\.|\[\g<square>*+\])*+)(\])[ ]?(\[)(\]) + name + meta.link.reference.literal.markdown + + list-paragraph + + patterns + + + begin + \G\s+(?=\S) + end + ^\s*$ + name + meta.paragraph.list.markdown + patterns + + + include + #inline + + + include + text.html.basic + + + include + #fenced-code-blocks + + + + + + raw + + captures + + 1 + + name + punctuation.definition.raw.markdown + + 2 + + name + markup.raw.inline.content.markdown + + 3 + + name + punctuation.definition.raw.markdown + + + match + (`+)((?:[^`]|(?!(?<!`)\1(?!`))`)*+)(\1) + name + markup.raw.inline.markdown + + separator + + match + \G[ ]{,3}([-*_])([ ]{,2}\1){2,}[ \t]*$\n? + name + meta.separator.markdown + + fenced-html + + begin + ^(\s*[`~]{3,})(html|html5)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + text.html.basic + + + + fenced-xml + + begin + ^(\s*[`~]{3,})(xml)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + text.xml + + + + fenced-diff + + begin + ^(\s*[`~]{3,})(diff)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.diff + + + + fenced-perl + + begin + ^(\s*[`~]{3,})(perl)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.perl + + + + fenced-php + + begin + ^(\s*[`~]{3,})(php)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.php + + + + fenced-css + + begin + ^(\s*[`~]{3,})(css)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.css + + + + fenced-less + + begin + ^(\s*[`~]{3,})(less)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.css.less + + + + fenced-java + + begin + ^(\s*[`~]{3,})(java)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.java + + + + fenced-c + + begin + ^(\s*[`~]{3,})(c)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.c + + + + fenced-c++ + + begin + ^(\s*[`~]{3,})(c\+\+|cpp)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.c++ + + + + fenced-yaml + + begin + ^(\s*[`~]{3,})(yaml)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.yaml + + + + fenced-sql + + begin + ^(\s*[`~]{3,})(sql)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.sql + + + + fenced-shell + + begin + ^(\s*[`~]{3,})(sh|shell)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.shell + + + + fenced-sass + + begin + ^(\s*[`~]{3,})(sass|scss)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.sass + + + + fenced-scala + + begin + ^(\s*[`~]{3,})(scala)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.scala + + + + fenced-obj-c + + begin + ^(\s*[`~]{3,})(objective-c)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.objc + + + + fenced-coffee + + begin + ^(\s*[`~]{3,})(coffee)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.coffee + + + + fenced-js + + begin + ^(\s*[`~]{3,})(js|json|javascript)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.js + + + + fenced-ruby + + begin + ^(\s*[`~]{3,})(ruby)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.ruby + + + + fenced-python + + begin + ^(\s*[`~]{3,})(py|python)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + patterns + + + include + source.python + + + + fenced-undefined + + begin + ^(\s*(`{3,}|~{3,}))(.*?)\s*$ + end + ^(\1)\n + name + markup.raw.block.markdown markup.raw.block.fenced.markdown + + fenced-code-blocks + + patterns + + + include + #fenced-html + + + include + #fenced-xml + + + include + #fenced-diff + + + include + #fenced-perl + + + include + #fenced-php + + + include + #fenced-css + + + include + #fenced-less + + + include + #fenced-java + + + include + #fenced-c + + + include + #fenced-c++ + + + include + #fenced-yaml + + + include + #fenced-sql + + + include + #fenced-shell + + + include + #fenced-sass + + + include + #fenced-scala + + + include + #fenced-obj-c + + + include + #fenced-coffee + + + include + #fenced-js + + + include + #fenced-ruby + + + include + #fenced-python + + + include + #fenced-undefined + + + + tag-kbd + + name + markup.kbd.markdown + match + ((<)(kbd)(>))([^<]+)((</)(kbd)(>)) + captures + + 1 + + name + meta.tag.other.html + + 2 + + name + punctuation.definition.tag.begin.html + + 3 + + name + entity.name.tag.other.html + + 4 + + name + punctuation.definition.tag.end.html + + 5 + + name + markup.kbd.content.markdown + + 6 + + name + meta.tag.other.html + + 7 + + name + punctuation.definition.tag.begin.html + + 8 + + name + entity.name.tag.other.html + + 9 + + name + punctuation.definition.tag.end.html + + + + + scopeName + text.html.markdown.academicmarkdown + uuid + a4707381-4d89-4565-91d5-9ca845c2bc42 + + diff --git a/AcademicMarkdownEditor.tmTheme b/AcademicMarkdownEditor.tmTheme new file mode 100755 index 0000000..58762a6 --- /dev/null +++ b/AcademicMarkdownEditor.tmTheme @@ -0,0 +1,1073 @@ + + + + + name + MarkdownEditing + settings + + + settings + + background + #ECECEC + caret + #00bbff + foreground + #555555 + invisibles + #E0E0E0 + lineHighlight + #e6e6e6 + selection + #C2E8FF + selectionBorder + #AACBDF + inactiveSelection + #B5D3E5 + findHighlight + #FFE792 + findHighlightForeground + #000000 + shadow + #808080 + shadowWidth + 6 + + + + + name + Comments + scope + comment, comment punctuation + settings + + fontStyle + + foreground + #ADADAD + + + + name + Comments: Preprocessor + scope + comment.block.preprocessor + settings + + fontStyle + + foreground + #ADADAD + + + + name + Comments: Documentation + scope + comment.documentation, comment.block.documentation + settings + + background + #FFFDF7 + fontStyle + + foreground + #BC670F + + + + name + Invalid - Deprecated + scope + invalid.deprecated + settings + + background + #EFCFCF + fontStyle + italic underline + + + + name + Invalid - Illegal + scope + invalid.illegal + settings + + background + #F93232 + fontStyle + + foreground + #F9F2CE + + + + name + Operators + scope + keyword.operator + settings + + fontStyle + + foreground + #626FC9 + + + + name + Keywords + scope + keyword, storage + settings + + fontStyle + + foreground + #61862F + + + + name + Types + scope + storage.type, support.type + settings + + fontStyle + + foreground + #6700B9 + + + + name + Language Constants + scope + constant.language, support.constant, variable.language + settings + + background + #E8E8E8 + fontStyle + + foreground + #7653C1 + + + + name + Variables + scope + variable, support.variable + settings + + fontStyle + + foreground + #4C8FC7 + + + + name + Variables: Punctuation + scope + variable punctuation + settings + + fontStyle + + foreground + #4C8FC7 + + + + name + Functions + scope + entity.name.function, support.function, entity + settings + + fontStyle + + foreground + #61862F + + + + name + Classes + scope + entity.name.type, entity.other.inherited-class, support.class + settings + + fontStyle + + foreground + #3A1D72 + + + + name + Exceptions + scope + entity.name.exception + settings + + foreground + #F93232 + + + + name + Sections + scope + entity.name.section,entity.name.section.markdown + settings + + fontStyle + bold + foreground + #333333 + + + + name + Numbers + scope + constant.numeric, constant + settings + + background + #F3F2FF + fontStyle + + foreground + #7653C1 + + + + name + Punctuation + scope + punctuation + settings + + fontStyle + + foreground + #000000 + + + + name + Strings + scope + constant.character, string + settings + + background + #FBE9AD1A + fontStyle + + foreground + #BC670F + + + + name + Strings: Punctuation + scope + string punctuation + settings + + fontStyle + + foreground + #E69A4C + + + + name + Strings: Escape Sequences + scope + constant.character.escape + settings + + background + #FBE9ADCC + fontStyle + bold + + + + name + Strings: Regular Expressions + scope + string.regexp + settings + + fontStyle + + foreground + #699D36 + + + + name + Strings: Symbols + scope + constant.other.symbol + settings + + background + #E8FFD5 + fontStyle + bold + + + + name + Embedded Source + scope + string source, text source + settings + + fontStyle + + foreground + #434343 + + + + name + ----------------------------------- + settings + + fontStyle + + + + + name + HTML: Doctype Declaration + scope + meta.tag.sgml.doctype + settings + + fontStyle + + foreground + #7F7F7F + + + + name + HTML: Tags + scope + + , text.html.markdown meta.disable-markdown entity.name.tag, + , text.html.markdown meta.disable-markdown meta.tag, + , text.html.markdown meta.disable-markdown meta.tag punctuation.definition.tag, + , text.html.markdown meta.disable-markdown meta.tag string.quoted meta.string-contents, + , text.html.markdown meta.disable-markdown meta.tag string.quoted punctuation.definition.string, + , text.html.markdown meta.disable-markdown meta.tag entity.other.attribute-name, + , text.html.markdown meta.paragraph.markdown entity.name.tag, + , text.html.markdown meta.paragraph.markdown meta.tag, + , text.html.markdown meta.paragraph.markdown meta.tag punctuation.definition.tag, + , text.html.markdown meta.paragraph.markdown meta.tag string.quoted meta.string-contents, + , text.html.markdown meta.paragraph.markdown meta.tag string.quoted punctuation.definition.string, + , text.html.markdown meta.paragraph.markdown meta.tag entity.other.attribute-name, + , text.html.markdown markup.list entity.name.tag, + , text.html.markdown markup.list meta.tag, + , text.html.markdown markup.list meta.tag punctuation.definition.tag, + , text.html.markdown markup.list meta.tag string.quoted meta.string-contents, + , text.html.markdown markup.list meta.tag string.quoted punctuation.definition.string, + , text.html.markdown markup.list meta.tag entity.other.attribute-name, + + settings + + foreground + #AAAAAA + background + #ECECEC + + + + name + HTML: Embedded + scope + source.smarty.embedded.html + settings + + foreground + #777777 + + + + name + HTML: Attribute Punctuation + scope + meta.tag string punctuation,punctuation.definition.entity.html + settings + + foreground + #91accf + + + + name + HTML: Tag Punctuation + scope + punctuation.definition.tag + settings + + foreground + #91accf + + + + name + HTML: Entities + scope + constant.character.entity + settings + + foreground + #6d98cf + + + + name + HTML: Attribute Names + scope + entity.other.attribute-name, text.html.markdown meta.disable-markdown meta.tag.block.any.html string.quoted.double.html, text.html.markdown meta.disable-markdown meta.tag.block.any.html string.quoted.double.html punctuation.definition + settings + + fontStyle + + foreground + #999999 + + + + name + HTML: Attribute Values + scope + meta.tag string.quoted, meta.tag string.quoted constant.character.entity + settings + + foreground + #6d98cf + + + + name + ----------------------------------- + settings + + fontStyle + + + + + name + CSS: Selectors + scope + meta.selector, meta.selector entity, meta.selector entity punctuation, entity.name.tag.css + settings + + fontStyle + + foreground + #3A77BF + + + + name + CSS: Property Names + scope + meta.property-name, support.type.property-name + settings + + foreground + #D4430D + + + + name + CSS: Property Values + scope + meta.property-value constant.numeric, meta.property-value constant, meta.property-value keyword + settings + + background + #FFFFFF + fontStyle + + foreground + #43A202 + + + + name + ----------------------------------- + settings + + + + name + Markup: Changed + scope + markup.changed + settings + + background + #FFFFDD + fontStyle + + foreground + #000000 + + + + name + Markup: Deletion + scope + markup.deleted + settings + + background + #FFDDDD + foreground + #000000 + + + + name + Markup: Emphasis + scope + markup.italic, markup.italic.markdown + settings + + fontStyle + italic + foreground + #777777 + background + #E8E8E8 + + + + name + Markdown: Link + scope + string.other.link.title.markdown,string.other.link.description.markdown + settings + + foreground + #333333 + background + #DDDDDD00 + + + + name + Markdown: Punctuation + scope + punctuation.definition.metadata.markdown,punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown, punctuation.definition.constant.markdown, punctuation.separator.key-value.markdown, punctuation.definition.constant.begin.markdown, punctuation.definition.constant.end.markdown,punctuation.definition.bold.markdown, punctuation.definition.italic.markdown, punctuation.definition.strikethrough.markdown, punctuation.definition.heading.markdown + settings + + foreground + #AAAAAA + background + #EEEEEE00 + + + + + name + Markdown: Punctuation + scope + markup.list.unnumbered.markdown meta.paragraph.list.markdown, markup.list.unnumbered.markdown punctuation.definition.list_item.markdown, markup.list.numbered.markdown, markup.list.numbered.markdown meta.paragraph.list.markdown, markup.list.numbered.markdown punctuation.definition.list_item.markdown + settings + + foreground + #666666 + background + #EEEEEE00 + + + + name + Markup: Error + scope + markup.error + settings + + background + #F93232 + fontStyle + + foreground + #F9F2CE + + + + name + Markup: Insertion + scope + markup.inserted + settings + + background + #DDFFDD + fontStyle + + foreground + #000000 + + + + name + Markup: Output + scope + markup.output, markup.raw + settings + + foreground + #7F7F7F + + + + name + Markup: Prompt + scope + markup.prompt + settings + + foreground + #555555 + + + + name + Markup: Heading + scope + markup.heading + settings + + fontStyle + bold + + + + name + Markup: Strong + scope + markup.bold, markup.bold.markdown + settings + + fontStyle + bold + foreground + #555555 + + + + name + Markup: Strikethrough + scope + + , markup.strikethrough, + , markup.strikethrough.markdown, + , markup.strikethrough constant.other.reference.link.markdown, + , markup.strikethrough entity.name.tag, + , markup.strikethrough markup.bold, + , markup.strikethrough markup.bold.markdown, + , markup.strikethrough markup.italic, + , markup.strikethrough markup.italic.markdown, + , markup.strikethrough markup.raw.inline.markdown, + , markup.strikethrough markup.underline.link.image.markdown, + , markup.strikethrough markup.underline.link.markdown, + , markup.strikethrough meta.link.inet.markdown markup.underline.link.markdown, + , markup.strikethrough meta.link.email.lt-gt.markdown markup.underline.link.markdown, + , markup.strikethrough punctuation.definition.bold.markdown, + , markup.strikethrough punctuation.definition.italic.markdown, + , markup.strikethrough punctuation.definition.constant.begin.markdown, + , markup.strikethrough punctuation.definition.constant.end.markdown, + , markup.strikethrough punctuation.definition.constant.markdown, + , markup.strikethrough punctuation.definition.metadata.markdown, + , markup.strikethrough punctuation.definition.raw.markdown, + , markup.strikethrough punctuation.definition.strikethrough.markdown, + , markup.strikethrough punctuation.definition.string.begin.markdown, + , markup.strikethrough punctuation.definition.string.end.markdown, + , markup.strikethrough punctuation.definition.tag.begin.html, + , markup.strikethrough punctuation.definition.tag.end.html, + , markup.strikethrough string.other.link.description.markdown, + , markup.strikethrough string.other.link.description.title.markdown, + , markup.strikethrough string.other.link.title.markdown, + + settings + + foreground + #CECECE + background + #ECECEC + + + + name + Markup: Strikethrough (Keyboard Shortcut) + scope + + , markup.strikethrough markup.kbd.content, + , markup.strikethrough markup.kbd.content.markdown, + + settings + + foreground + #B7B7B7 + background + #DDDDDD + + + + name + Markup: Keyboard Shortcut + scope + markup.kbd.content.markdown + settings + + background + #D3D3D3 + foreground + #131313 + + + + name + Markup: Traceback + scope + markup.traceback + settings + + foreground + #F93232 + + + + name + Markup: Underline + scope + markup.underline,markup.underline.link.markdown,constant.other.reference.link.markdown,meta.image.reference.markdown + settings + + background + #E8E8E8 + foreground + #AAAAAA + + + + name + Markup: Plain Link + scope + + , meta.link.inet.markdown markup.underline.link.markdown, + , meta.link.email.lt-gt.markdown markup.underline.link.markdown, + + settings + + foreground + #444488 + + + + name + ----------------------------------- + settings + + + + name + Extra: Diff Range + scope + meta.diff.range, meta.diff.index, meta.separator + settings + + background + #EAF2F5 + fontStyle + + foreground + #434343 + + + + name + Extra: Diff From + scope + meta.diff.header.from-file + settings + + background + #FFDDDD + foreground + #434343 + + + + name + Extra: Diff To + scope + meta.diff.header.to-file + settings + + background + #DDFFDD + foreground + #434343 + + + + name + Markdown Meta + scope + meta.header.multimarkdown,keyword.other.multimarkdown,string.unquoted.multimarkdown,punctuation.separator.key-value.multimarkdown + settings + + background + #DDDDDD + foreground + #BBBBBB + + + + name + Markdown separator + scope + meta.separator.markdown + settings + + background + #BBBBBB22 + foreground + #AAAAAA + + + + name + Blockquote + scope + markup.quote.markdown + settings + + foreground + #999999 + + + + name + Blockquote (Tags) + scope + + , text.html.markdown markup.quote.markdown entity.name.tag, + , text.html.markdown markup.quote.markdown meta.tag, + , text.html.markdown markup.quote.markdown meta.tag punctuation.definition.tag, + , text.html.markdown markup.quote.markdown meta.tag string.quoted meta.string-contents, + , text.html.markdown markup.quote.markdown meta.tag string.quoted punctuation.definition.string, + , text.html.markdown markup.quote.markdown meta.tag entity.other.attribute-name, + + settings + + foreground + #CECECE + background + #ECECEC + + + + name + Blockquote (Keyboard Shortcut) + scope + text.html.markdown markup.quote.markdown markup.kbd.content.markdown + settings + + background + #e5e5e5 + foreground + #717171 + + + + name + Blockquote (Bold) + scope + + , text.html.markdown markup.quote.markdown markup.bold, + , text.html.markdown markup.quote.markdown markup.bold.markdown, + + settings + + foreground + #999999 + + + + name + Blockquote punctuation + scope + punctuation.definition.blockquote.markdown + settings + + background + #D0D0D0 + foreground + #D0D0D0 + + + + name + Markdown separator + scope + markup.raw.block.markdown + settings + + background + #dedede + foreground + #555555 + + + + name + Markdown separator + scope + markup.raw.inline.markdown + settings + + background + #dedede + + + + name + Block Cursor + scope + block_cursor + settings + + foreground + #212121 + background + #00bdff77 + + + + name + Brackets + scope + entity.name.class + settings + + background + #d5f6ff88 + + + + + + + + name + Addition + scope + criticmarkup.addition + settings + + fontStyle + + foreground + #00CD09 + + + + name + highlight + scope + criticmarkup.highlight + settings + + fontStyle + italic + foreground + #DF37DD + + + + name + Deletion + scope + criticmarkup.deletion + settings + + fontStyle + + foreground + #D51D00 + + + + name + comment + scope + criticmarkup.comment + settings + + fontStyle + + foreground + #4D5CD3 + + + + + + + + + name + WordHighlight + scope + wordhighlight + settings + + foreground + #212121 + background + #00bdff77 + + + + name + BracketHighlighter + scope + brackethighlighter.default + settings + + foreground + #212121 + background + # + + + + uuid + BF4E1964-0DB9-4E88-8142-E8F52D7EDEEC + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..bd1428e --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Academic Markdown Notes +This extension to MarkdownEditing adds an Academic Markdown language variant, currently under development. So far it adds highlighting for [CriticMarkup](http://criticmarkup.com/) notation and for @Citekey notation (Pandoc version). + + +