aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-02-24 20:46:50 +0000
committerRalph Amissah <ralph@amissah.com>2008-02-24 20:46:50 +0000
commitb3e9f8dbd0e046a8a65e27c2e340c5fdfc84b720 (patch)
tree6a1d37a78d6c34c35cdee9cbef57f6e00408654d
parentsisu-0.65.0 (diff)
vim syntax highlighting for sisu-0.66
refinements to semantic tag matching still no error checking and match wider than likely to be ultimately check for earlier versions of vim removed updated to use "hi def link" instead of HiLink
-rw-r--r--data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim207
1 files changed, 101 insertions, 106 deletions
diff --git a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
index cfaded0d..3ce6637b 100644
--- a/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
+++ b/data/sisu/conf/editor-syntax-etc/vim/syntax/sisu.vim
@@ -1,84 +1,83 @@
-"%% SiSU Vim syntax file
-" SiSU Maintainer: Ralph Amissah <ralph@amissah.com>
-" SiSU Markup: SiSU (sisu-0.55.5) (2007-07-22)
-" (originally looked at Ruby Vim by Mirko Nasato)
+"SiSU Vim syntax file
+"SiSU Maintainer: Ralph Amissah <ralph@amissah.com>
+"SiSU Markup: SiSU (sisu-0.66.0, 2008-02-24)
+"(originally looked at Ruby Vim by Mirko Nasato)
+
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
else
endif
-"% 11 Errors?
+
+" Errors:
syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>"
-"% 10 Markers: Endnote Identifiers, Pagebreaks etc.:
+
+" Markers Identifiers:
if !exists("sisu_no_identifiers")
- syn match sisu_mark_endnote "\~^"
- syn match sisu_contain contains=@NoSpell "</\?sub>"
- syn match sisu_break contains=@NoSpell "<br>\|<br />"
- syn match sisu_control contains=@NoSpell "<p>\|</p>\|<p />\|<:p[bn]>"
- syn match sisu_html "<center>\|</center>"
- syn match sisu_marktail "[~-]#"
- syn match sisu_html contains=@NoSpell "<td>\|<td \|<tr>\|</td>\|</tr>\|<table>\|<table \|</table>"
- syn match sisu_control "\""
- syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)"
- syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}"
- syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+"
+ syn match sisu_mark_endnote "\~^"
+ syn match sisu_contain contains=@NoSpell "</\?sub>"
+ syn match sisu_break contains=@NoSpell "<br>\|<br />"
+ syn match sisu_control contains=@NoSpell "<p>\|</p>\|<p />\|<:p[bn]>"
+ syn match sisu_html "<center>\|</center>"
+ syn match sisu_marktail "[~-]#"
+ syn match sisu_html contains=@NoSpell "<td>\|<td \|<tr>\|</td>\|</tr>\|<table>\|<table \|</table>"
+ syn match sisu_control "\""
+ syn match sisu_underline "\(^\| \)_[a-zA-Z0-9]\+_\([ .,]\|$\)"
+ syn match sisu_number contains=@NoSpell "[0-9a-f]\{32\}\|[0-9a-f]\{64\}"
+ syn match sisu_link contains=@NoSpell "\(_\?https\?://\|\.\.\/\)\S\+"
"metaverse specific
- syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>"
- syn match sisu_marktail "<\~#>"
- syn match sisu_markpara contains=@NoSpell "<:i[1-9]>"
- syn match sisu_link " \*\~\S\+"
- syn match sisu_action "^<:insert\d\+>"
- syn match sisu_contain "<:e>"
- syn match sisu_sem_marker "[a-z]\+;{"
- syn match sisu_sem_marker "};[a-z]\+"
- syn match sisu_sem_marker_block "[a-z]\+:{"
- syn match sisu_sem_marker_block "}:[a-z]\+"
- syn match sisu_sem_ex_marker "[a-z]\+;\["
- syn match sisu_sem_ex_marker "\];[a-z]\+"
- syn match sisu_sem_ex_marker_block "[a-z]\+:\["
- syn match sisu_sem_ex_marker_block "\]:[a-z]\+"
- "syn match sisu_error_sem_marker "[a-z]\+[:;]{"
- "syn match sisu_error_sem_marker "}[:;][a-z]\+"
- syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]\+\):{[^}].\{-}}:\1"
- syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker "\([a-z]\+\);{[^}].\{-}};\1"
- syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]\+\):\[[^}].\{-}\]:\1"
- syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker "\([a-z]\+\);\[[^}].\{-}\];\1"
+ syn match sisu_ocn contains=@NoSpell "<\~\d\+;\w\d\+;\w\d\+>"
+ syn match sisu_marktail "<\~#>"
+ syn match sisu_markpara contains=@NoSpell "<:i[1-9]>"
+ syn match sisu_link " \*\~\S\+"
+ syn match sisu_action "^<:insert\d\+>"
+ syn match sisu_contain "<:e>"
+ syn match sisu_sem_marker ";{\|};[a-z._]*[a-z]"
+ syn match sisu_sem_marker_block "\([a-z][a-z._]*\|\):{\|}:[a-z._]*[a-z]"
+ syn match sisu_sem_ex_marker ";\[\|\];[a-z._]*[a-z]"
+ syn match sisu_sem_ex_marker_block "\([a-z][a-z._]*\|\):\[\|\]:[a-z._]*[a-z]"
+ syn match sisu_sem_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):{[^}].\{-}}:\1"
+ syn match sisu_sem_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";{[^}].\{-}};[a-z]\+"
+ syn match sisu_sem_ex_block contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_mark_endnote,sisu_content_endnote "\([a-z]*\):\[[^}].\{-}\]:\1"
+ syn match sisu_sem_ex_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker ";\[[^}].\{-}\];[a-z]\+"
endif
-"% 9 URLs Numbers: and ASCII Codes
+
+"URLs Numbers And ASCII Codes:
syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>"
syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)"
-"% 8 Tuned Error - is error if not already matched
+
+"Tuned Error: (is error if not already matched)
syn match sisu_error contains=sisu_error "[\~/\*!_]{\|}[\~/\*!_]"
syn match sisu_error contains=sisu_error "<a href\|</a>]"
-"% 7 Simple Enclosed Markup:
-" Simple Markup:
-"% url/link
+
+"Simple Paired Enclosed Markup:
+"url/link
syn region sisu_link contains=sisu_error,sisu_error_wspace matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$"
-"% header
+"header
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^0\~\(\S\+\|[^-]\)" end="\n$"
syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^[@%]\S\+:[+-]\?\s"rs=e-1 end="\n$"
-"% headings
+"headings
syn region sisu_heading contains=sisu_mark_endnote,sisu_content_endnote,sisu_marktail,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_ocn,sisu_error,sisu_error_wspace matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$"
-"% grouped text
+"grouped text
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^table{.\+" end="}table"
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^{\(t\|table\)\(\~h\)\?\(\sc[0-9]\+;\)\?[0-9; ]*}" end="\n\n"
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)"
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code"
-"% endnotes
+"endnotes
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker matchgroup=sisu_mark_endnote start="\~{[*+]*" end="}\~" skip="\n"
syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break,sisu_sem_block,sisu_sem_content,sisu_sem_marker matchgroup=sisu_mark_endnote start="\~\[[*+]*" end="\]\~" skip="\n"
syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n"
-"% links and images
+"links and images
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="}\(https\?:/\/\|\.\./\)\S\+" oneline
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_sem_block,sisu_error matchgroup=sisu_link start="{\(\~^\s\)\?" end="\[[1-5][sS]*\]}\S\+\.ss[tm]" oneline
syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_link start="{" end="}image" oneline
-"% some line operations
+"some line operations
syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$"
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_sem_block,sisu_sem_content,sisu_sem_marker_block,sisu_sem_marker,sisu_sem_ex_marker_block,sisu_sem_ex_marker,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^_\([1-9*]\|[1-9]\*\) " end="$"
syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$"
syn region sisu_comment matchgroup=sisu_comment start="^%\{1,2\} " end="$"
-"% font face curly brackets
+"font face curly brackets
"syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_sem start="\S\+:{" end="}:[^<>,.!?:; ]\+" oneline
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="\*{" end="}\*"
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start="!{" end="}!"
@@ -89,33 +88,35 @@ syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_fontface start=",{" end="},"
syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-"
syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline
-"% single words bold italicise etc. "workon
+"single words bold italicise etc. "workon
syn region sisu_control contains=sisu_error matchgroup=sisu_control start="\([ (]\|^\)\*[^\|{\n\~\\]"hs=e-1 end="\*"he=e-0 skip="[a-zA-Z0-9']" oneline
syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline
-"% misc
+"misc
syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline
-"% metaverse html (flagged as errors for filetype sisu)
+"metaverse html (flagged as errors for filetype sisu)
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<b>" end="</b>" skip="\n" oneline
syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<em>" end="</em>" skip="\n" oneline
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<i>" end="</i>" skip="\n" oneline
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<u>" end="</u>" skip="\n" oneline
syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_mark matchgroup=sisu_html start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="<del>" end="</del>" oneline
-"% metaverse <:>
+"metaverse
syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>"
syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>"
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>"
syn region sisu_content_alt contains=sisu_mark_endnote,sisu_content_endnote,sisu_link,sisu_mark,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>"
-"% 6 Expensive Mode
-" Expensive Mode:
+
+"Expensive Mode:
if !exists("sisu_no_expensive")
else " not Expensive
syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline
endif " Expensive?
-"% 5 Headers: and Headings (Document Instructions)
+
+"Headers And Headings: (Document Instructions)
syn match sisu_control contains=sisu_error,sisu_error_wspace "4\~! \S\+"
syn region sisu_markpara contains=sisu_error,sisu_error_wspace start="^=begin" end="^=end.*$"
-"% 4 Errors?
+
+"Errors:
syn match sisu_error_wspace contains=sisu_error_wspace "^\s\+"
syn match sisu_error_wspace contains=sisu_error_wspace "\s\s\+"
syn match sisu_error_wspace contains=sisu_error_wspace " \s*$"
@@ -137,58 +138,52 @@ syn match sisu_error contains=sisu_error "<dir>"
"errors for filetype sisu, though not error in 'metaverse':
syn match sisu_error contains=sisu_error,sisu_match,sisu_strikeout,sisu_contain,sisu_content_alt,sisu_mark,sisu_break,sisu_number "<[a-zA-Z\/]\+>"
syn match sisu_error "/\?<\([biu]\)>[^(</\1>)]\{-}\n\n"
-"% 3 Error Exceptions?
+
+"Error Exceptions:
syn match sisu_control "\n\n" "contains=ALL
syn match sisu_control " //"
syn match sisu_error "%{"
syn match sisu_error "<br>_\?https\?:\S\+\|_\?https\?:\S\+<br>"
syn match sisu_error "[><]_\?https\?:\S\+\|_\?https\?:\S\+[><]"
-"% 2 Definitions - Define the default highlighting.
-if version >= 508 || !exists("did_sisu_syntax_inits")
- if version < 508
- let did_sisu_syntax_inits = 1
- command -nargs=+ HiLink hi link <args>
- else
- command -nargs=+ HiLink hi def link <args>
- endif
-"% 1 Defined
- HiLink sisu_normal Normal
- HiLink sisu_header PreProc
- HiLink sisu_header_content Statement
- HiLink sisu_heading Title
- HiLink sisu_structure Operator
- HiLink sisu_contain Include
- HiLink sisu_mark_endnote Include
- HiLink sisu_link NonText
- HiLink sisu_linked String
- HiLink sisu_fontface Include
- HiLink sisu_strikeout DiffDelete
- HiLink sisu_content_alt Special
- HiLink sisu_sem_content String
- HiLink sisu_sem_content SpecialKey
- HiLink sisu_sem_block Special
- HiLink sisu_sem_marker Visual
- HiLink sisu_sem_marker_block MatchParen
- HiLink sisu_sem_ex_marker FoldColumn
- HiLink sisu_sem_ex_marker_block Folded
- HiLink sisu_sem_ex_content Comment
- HiLink sisu_sem_ex_block Comment
- HiLink sisu_content_endnote Special
- HiLink sisu_control Define
- HiLink sisu_ocn Include
- HiLink sisu_number Number
- HiLink sisu_identifier Function
- HiLink sisu_underline Underlined
- HiLink sisu_markpara Include
- HiLink sisu_marktail Include
- HiLink sisu_mark Identifier
- HiLink sisu_break Structure
- HiLink sisu_html Type
- HiLink sisu_action Identifier
- HiLink sisu_comment Comment
- HiLink sisu_error_sem_marker Error
- HiLink sisu_error_wspace Error
- HiLink sisu_error Error
- delcommand HiLink
-endif
+
+"Definitions Default Highlighting:
+hi def link sisu_normal Normal
+hi def link sisu_header PreProc
+hi def link sisu_header_content Statement
+hi def link sisu_heading Title
+hi def link sisu_structure Operator
+hi def link sisu_contain Include
+hi def link sisu_mark_endnote Include
+hi def link sisu_link NonText
+hi def link sisu_linked String
+hi def link sisu_fontface Include
+hi def link sisu_strikeout DiffDelete
+hi def link sisu_content_alt Special
+hi def link sisu_sem_content String
+hi def link sisu_sem_content SpecialKey
+hi def link sisu_sem_block Special
+hi def link sisu_sem_marker Visual
+"hi def link sisu_sem_marker Structure
+hi def link sisu_sem_marker_block MatchParen
+hi def link sisu_sem_ex_marker FoldColumn
+hi def link sisu_sem_ex_marker_block Folded
+hi def link sisu_sem_ex_content Comment
+"hi def link sisu_sem_ex_content SpecialKey
+hi def link sisu_sem_ex_block Comment
+hi def link sisu_content_endnote Special
+hi def link sisu_control Define
+hi def link sisu_ocn Include
+hi def link sisu_number Number
+hi def link sisu_identifier Function
+hi def link sisu_underline Underlined
+hi def link sisu_markpara Include
+hi def link sisu_marktail Include
+hi def link sisu_mark Identifier
+hi def link sisu_break Structure
+hi def link sisu_html Type
+hi def link sisu_action Identifier
+hi def link sisu_comment Comment
+hi def link sisu_error_sem_marker Error
+hi def link sisu_error_wspace Error
+hi def link sisu_error Error
let b:current_syntax = "sisu"