From 8baab3c8d7a6f22888bd581cd5c6098fd2e4b5a8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2024 04:44:24 +0200 Subject: Adding upstream version 2:8.1.0875. Signed-off-by: Daniel Baumann --- runtime/syntax/asciidoc.vim | 185 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 185 insertions(+) create mode 100644 runtime/syntax/asciidoc.vim (limited to 'runtime/syntax/asciidoc.vim') diff --git a/runtime/syntax/asciidoc.vim b/runtime/syntax/asciidoc.vim new file mode 100644 index 0000000..ccb079e --- /dev/null +++ b/runtime/syntax/asciidoc.vim @@ -0,0 +1,185 @@ +" Vim syntax file +" Language: AsciiDoc +" Author: Stuart Rackham (inspired by Felix +" Obenhuber's original asciidoc.vim script). +" URL: http://asciidoc.org/ +" Licence: GPL (http://www.gnu.org) +" Remarks: Vim 6 or greater +" Last Update: 2014 Aug 29 (see Issue 240) +" Limitations: +" +" - Nested quoted text formatting is highlighted according to the outer +" format. +" - If a closing Example Block delimiter may be mistaken for a title +" underline. A workaround is to insert a blank line before the closing +" delimiter. +" - Lines within a paragraph starting with equals characters are +" highlighted as single-line titles. +" - Lines within a paragraph beginning with a period are highlighted as +" block titles. + + +if exists("b:current_syntax") + finish +endif + +syn clear +syn sync fromstart +syn sync linebreaks=100 + +" Run :help syn-priority to review syntax matching priority. +syn keyword asciidocToDo TODO FIXME CHECK TEST XXX ZZZ DEPRECATED +syn match asciidocBackslash /\\/ +syn region asciidocIdMarker start=/^\$Id:\s/ end=/\s\$$/ +syn match asciidocCallout /\\\@/ +syn match asciidocOpenBlockDelimiter /^--$/ +syn match asciidocLineBreak /[ \t]+$/ containedin=asciidocList +syn match asciidocRuler /^'\{3,}$/ +syn match asciidocPagebreak /^<\{3,}$/ +syn match asciidocEntityRef /\\\@\?[0-9A-Za-z_]\@!/ +syn match asciidocAttributeRef /\\\@.]\{,3}\)\?\([a-z]\)\?\)\?|/ containedin=asciidocTableBlock contained +syn region asciidocTableBlock matchgroup=asciidocTableDelimiter start=/^|=\{3,}$/ end=/^|=\{3,}$/ keepend contains=ALL +syn match asciidocTablePrefix /\(\S\@.]\{,3}\)\?\([a-z]\)\?\)\?!/ containedin=asciidocTableBlock contained +syn region asciidocTableBlock2 matchgroup=asciidocTableDelimiter2 start=/^!=\{3,}$/ end=/^!=\{3,}$/ keepend contains=ALL + +syn match asciidocListContinuation /^+$/ +syn region asciidocLiteralBlock start=/^\.\{4,}$/ end=/^\.\{4,}$/ contains=asciidocCallout,asciidocToDo keepend +syn region asciidocListingBlock start=/^-\{4,}$/ end=/^-\{4,}$/ contains=asciidocCallout,asciidocToDo keepend +syn region asciidocCommentBlock start="^/\{4,}$" end="^/\{4,}$" contains=asciidocToDo +syn region asciidocPassthroughBlock start="^+\{4,}$" end="^+\{4,}$" + +" Allowing leading \w characters in the filter delimiter is to accomodate +" the pre version 8.2.7 syntax and may be removed in future releases. +syn region asciidocFilterBlock start=/^\w*\~\{4,}$/ end=/^\w*\~\{4,}$/ + +syn region asciidocMacroAttributes matchgroup=asciidocRefMacro start=/\\\@>\)\|^$/ contains=asciidocQuoted.* keepend +syn region asciidocMacroAttributes matchgroup=asciidocAnchorMacro start=/\\\@