comment A very early hack. Mostly ripped from other syntaxes. Only the very basic stuff is working. fileTypes asc foldingStartMarker (?x) (([/+-.*_=]){4,} |<!--(?!.*-->) ) foldingStopMarker (?x) (([/+-.*_=]){4,} |^\s*--> ) keyEquivalent ^~A name AsciiDoc patterns begin (?x)^ (?= ([/+-.*_=]{4,})\s*$ | ([ \t]{1,}) | [=]{1,6}\s*+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ ) end (?x)^ (?! \1 | ([ \t]{1,}) | [=]{1,6}\s*+ | [ ]{,3}(?<marker>[-*_])([ ]{,2}\k<marker>){2,}[ \t]*+$ ) name meta.block-level.asciidoc patterns include #block_quote include #block_raw include #heading_inline include #separator begin ^[ ]{0,3}([*+-])(?=\s) captures 1 name punctuation.definition.list_item.asciidoc end ^(?=\S) name markup.list.unnumbered.asciidoc patterns include #list-paragraph begin ^[ ]{0,3}[0-9]+(\.)(?=\s) captures 1 name punctuation.definition.list_item.asciidoc end ^(?=\S) name markup.list.numbered.asciidoc patterns include #list-paragraph begin ^([/+-.*_=]){4,}\s*$ end ^\1{4,}\s*$ name comment.block.asciidoc begin ^([/+.]){4,}\s*$ comment asciidoc formatting is disabled inside certain blocks. end ^[/+.]{4,}\s*$ name meta.disable-asciidoc begin ^(?=\S)(?![=-]{3,}(?=$))(?!\.\S+) end ^(?:\s*$|(?=[ ]{,3}>.))|(?=[ \t]*\n)(?<=^===|^====|=====|^---|^----|-----)[ \t]*\n name meta.paragraph.asciidoc patterns include #inline include text.html.basic captures 1 name punctuation.definition.heading.asciidoc match ^(={3,})(?=[ \t]*$) name markup.heading.0.asciidoc captures 1 name punctuation.definition.heading.asciidoc match ^(-{3,})(?=[ \t]*$) name markup.heading.1.asciidoc captures 1 name punctuation.definition.heading.asciidoc match ^(~{3,})(?=[ \t]*$) name markup.heading.2.asciidoc captures 1 name punctuation.definition.heading.asciidoc match ^(\^{3,})(?=[ \t]*$) name markup.heading.3.asciidoc captures 1 name punctuation.definition.heading.asciidoc match ^(\+{3,})(?=[ \t]*$) name markup.heading.4.asciidoc repository block_quote begin ^([/+-.*_=]){4,}\s*$ end ^\1{4,}\s*$ name comment.block.asciidoc block_raw match \G([ ]{4}|\t).*$\n? name markup.raw.block.asciidoc bold begin (\*|\*\*)(?=\S) captures 1 name punctuation.definition.bold.asciidoc end (?<=\S)(\1) name markup.bold.asciidoc bracket comment asciidoc 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.asciidoc escape match \\[-`*_#+.!(){}\[\]\\>] name constant.character.escape.asciidoc heading captures 1 name punctuation.definition.heading.asciidoc contentName entity.name.section.asciidoc match (?m)^(\S+)$([=-~^+])+\s*$ name markup.heading.asciidoc heading_inline begin \G(={1,6})(?!=)\s*(?=\S) captures 1 name punctuation.definition.heading.asciidoc contentName entity.name.section.asciidoc end \s*(=*)$\n? name markup.heading.asciidoc patterns include #inline inline patterns include #escape include #bracket include #raw include #bold include #italic include #line-break italic begin (_|__)(?=\S) captures 1 name punctuation.definition.italic.asciidoc end (?<=\S)(\1)((?!\1)|(?=\1\1)) name markup.italic.asciidoc line-break match {\+}$ name meta.dummy.line-break list-paragraph patterns begin \G\s+(?=\S) end ^\s*$ name meta.paragraph.list.asciidoc patterns include #inline raw captures 1 name punctuation.definition.raw.asciidoc 3 name punctuation.definition.raw.asciidoc match (`+)([^`]|(?!(?<!`)\1(?!`))`)*+(\1) name markup.raw.inline.asciidoc separator match \G[ ]{,3}([-*_])([ ]{,2}\1){2,}[ \t]*$\n? name meta.separator.asciidoc scopeName text.html.asciidoc uuid 090F38B8-2CEB-4956-A627-E24C7AA16ED6