comparison runtime/syntax/sisu.vim @ 843:9f279ebda751 v7.0f01

updated for version 7.0f01
author vimboss
date Tue, 25 Apr 2006 22:13:59 +0000
parents c2cae213194d
children d58e3db4a7d1
comparison
equal deleted inserted replaced
842:a209672376fd 843:9f279ebda751
3 " SiSU Markup: SiSU (sisu-0.38) 3 " SiSU Markup: SiSU (sisu-0.38)
4 " (originally looked at Ruby Vim by Mirko Nasato) 4 " (originally looked at Ruby Vim by Mirko Nasato)
5 if version < 600 5 if version < 600
6 syntax clear 6 syntax clear
7 elseif exists("b:current_syntax") 7 elseif exists("b:current_syntax")
8 " :colorscheme green
9 finish 8 finish
10 else 9 else
11 endif 10 endif
12 "% 11 Errors? 11 "% 11 Errors?
13 syn match sisu_error contains=sisu_contain,sisu_control,sisu_markpara,sisu_mark,sisu_content_alt,sisu_error_wspace "<![^ei]\S\+!>" 12 syn match sisu_error contains=sisu_link,sisu_error_wspace "<![^ei]\S\+!>"
14 "% 10 Markers: Endnote Identifiers, Pagebreaks etc.: 13 "% 10 Markers: Endnote Identifiers, Pagebreaks etc.:
15 if !exists("sisu_no_identifiers") 14 if !exists("sisu_no_identifiers")
16 syn match sisu_mark_endnote "\~^" 15 syn match sisu_mark_endnote "\~^"
17 syn match sisu_contain "</\?sub>" 16 syn match sisu_contain "</\?sub>"
18 syn match sisu_break "<br>\|<br />" 17 syn match sisu_break "<br>\|<br />"
31 syn match sisu_action "^<:insert\d\+>" 30 syn match sisu_action "^<:insert\d\+>"
32 syn match sisu_contain "<:e>" 31 syn match sisu_contain "<:e>"
33 endif 32 endif
34 "% 9 URLs Numbers: and ASCII Codes 33 "% 9 URLs Numbers: and ASCII Codes
35 syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>" 34 syn match sisu_number "\<\(0x\x\+\|0b[01]\+\|0\o\+\|0\.\d\+\|0\|[1-9][\.0-9_]*\)\>"
36 syn match sisu_link "\(http://\|\.\./\)\S\+"
37 syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)" 35 syn match sisu_number "?\(\\M-\\C-\|\\c\|\\C-\|\\M-\)\=\(\\\o\{3}\|\\x\x\{2}\|\\\=\w\)"
38 "% 8 Tuned Error - is error if not already matched 36 "% 8 Tuned Error - is error if not already matched
39 syn match sisu_error "[\~/\*!_]{\|}[\~/\*!_]" contains=sisu_error 37 syn match sisu_error "[\~/\*!_]{\|}[\~/\*!_]" contains=sisu_error
40 syn match sisu_error "<a href\|</a>]" contains=sisu_error 38 syn match sisu_error "<a href\|</a>]" contains=sisu_error
41 "% 7 Simple Enclosed Markup: 39 "% 7 Simple Enclosed Markup:
42 " Simple Markup: 40 " Simple Markup:
41 "% url/link
42 syn region sisu_link contains=sisu_error,@NoSpell matchgroup=sisu_link start="\(http://\|\.\.\/\)" end="\(\s\|$\)"
43 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="$"
43 "% header 44 "% header
44 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="$" 45 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="$"
45 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\~\(tags\?\|date\)\s\+"rs=e-1 end="\n$" 46 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\~\(tags\?\|date\)\s\+"rs=e-1 end="\n$"
46 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="$" 47 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="$"
47 syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\(tags\?\|date\):\s\+"rs=e-1 end="\n$" 48 syn region sisu_header_content contains=sisu_error,sisu_error_wspace,sisu_content_alt,sisu_link,sisu_linked,sisu_break matchgroup=sisu_header start="^@\(tags\?\|date\):\s\+"rs=e-1 end="\n$"
48 "% headings 49 "% headings
49 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,sisu_error_spell,@Spell matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$" 50 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,@Spell matchgroup=sisu_structure start="^\([1-8]\|:\?[A-C]\)\~\(\S\+\|[^-]\)" end="$"
50 "% grouped text 51 "% grouped text
51 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_contain start="table{.\+" end="}table" 52 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_contain start="table{.\+" end="}table"
52 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_contain start="{t\~h}" end="$$" 53 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_contain start="{t\~h}" end="$$"
53 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,sisu_error_spell,@Spell matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)" 54 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,@Spell matchgroup=sisu_contain start="^\(alt\|group\|poem\){" end="^}\(alt\|group\|poem\)"
54 syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code" 55 syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="^code{" end="^}code"
55 "% endnotes 56 "% endnotes
56 syn region sisu_content_endnote contains=sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,@Spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{" end="}\~" skip="\n" 57 syn region sisu_content_endnote contains=@Spell,sisu_link,sisu_strikeout,sisu_underline,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_wspace,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\~{" end="}\~" skip="\n"
57 syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,sisu_error_spell,@Spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n" 58 syn region sisu_content_endnote contains=sisu_strikeout,sisu_number,sisu_control,sisu_link,sisu_identifier,sisu_error,sisu_error_wspace,@Spell,sisu_mark,sisu_break matchgroup=sisu_mark_endnote start="\^\~" end="\n\n"
58 "% images 59 "% images
59 syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline 60 syn region sisu_linked contains=sisu_fontface,sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_link start="{" end="}\(\(http://\|\.\./\)\S\+\|image\)" oneline
60 "% line operations 61 "% some line operations
61 syn region sisu_link contains=sisu_error,sisu_error_wspace,sisu_error_spell,@Spell matchgroup=sisu_action start="^<<\s*|[a-zA-Z0-9^._-]\+|@|[a-zA-Z0-9^._-]\+|"rs=s+2 end="$" 62 syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace,@Spell matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$"
62 syn region sisu_control contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_error,sisu_error_wspace,sisu_error_spell,@Spell matchgroup=sisu_control start="\(\(^\| \)!_ \|<:b>\)" end="$" 63 syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace,@Spell matchgroup=sisu_markpara start="^_\([12*]\|[12]\*\) " end="$"
63 syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace,sisu_error_spell,@Spell matchgroup=sisu_markpara start="^_\([12*]\|[12]\*\) " end="$" 64 syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace,@Spell matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$"
64 syn region sisu_normal contains=sisu_strikeout,sisu_identifier,sisu_content_endnote,sisu_mark_endnote,sisu_link,sisu_linked,sisu_error,sisu_error_wspace,sisu_error_spell,@Spell matchgroup=sisu_markpara start="^\(#[ 1]\|_# \)" end="$" 65 syn region sisu_comment contains=@Spell matchgroup=sisu_comment start="^%\{1,2\} " end="$"
65 syn region sisu_comment contains=sisu_error_spell,@Spell matchgroup=sisu_comment start="^%\{1,2\} " end="$"
66 "% font face curly brackets 66 "% font face curly brackets
67 syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start="\*{" end="}\*" 67 syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start="\*{" end="}\*"
68 syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start="!{" end="}!" 68 syn region sisu_control contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start="!{" end="}!"
69 syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start="_{" end="}_" 69 syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start="_{" end="}_"
70 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start="/{" end="}/" 70 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start="/{" end="}/"
71 syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start="+{" end="}+" 71 syn region sisu_underline contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start="+{" end="}+"
72 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start="\^{" end="}\^" 72 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start="\^{" end="}\^"
73 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_fontface start=",{" end="}," 73 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_fontface start=",{" end="},"
74 syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-" 74 syn region sisu_strikeout contains=sisu_error matchgroup=sisu_fontface start="-{" end="}-"
75 syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline 75 syn region sisu_html contains=sisu_error contains=sisu_strikeout matchgroup=sisu_contain start="<a href=\".\{-}\">" end="</a>" oneline
76 "% single words bold italicise etc. "workon 76 "% single words bold italicise etc. "workon
77 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 77 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
78 syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline 78 syn region sisu_identifier contains=sisu_error matchgroup=sisu_content_alt start="\([ ]\|^\)/[^{ \|\n\\]"hs=e-1 end="/\[ \.\]" skip="[a-zA-Z0-9']" oneline
79 "% html
80 syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell,sisu_mark matchgroup=sisu_html start="<b>" end="</b>" skip="\n" oneline
81 syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell,sisu_mark matchgroup=sisu_html start="<em>" end="</em>" oneline
82 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell,sisu_mark matchgroup=sisu_html start="<i>" end="</i>" skip="\n" oneline
83 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell,sisu_mark matchgroup=sisu_html start="<u>" end="</u>" skip="\n" oneline
84 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell,sisu_mark matchgroup=sisu_html start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
85 syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="<del>" end="</del>" oneline
86 "% misc 79 "% misc
87 syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline 80 syn region sisu_identifier contains=sisu_error matchgroup=sisu_fontface start="\^[^ {\|\n\\]"rs=s+1 end="\^[ ,.;:'})\\\n]" skip="[a-zA-Z0-9']" oneline
88 "% metaverse 81 "% metaverse html
89 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,sisu_error_spell,@Spell matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>" 82 syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell,sisu_mark matchgroup=sisu_html start="<b>" end="</b>" skip="\n" oneline
83 syn region sisu_number contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell,sisu_mark matchgroup=sisu_html start="<em>" end="</em>" oneline
84 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell,sisu_mark matchgroup=sisu_html start="<i>" end="</i>" skip="\n" oneline
85 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell,sisu_mark matchgroup=sisu_html start="<u>" end="</u>" skip="\n" oneline
86 syn region sisu_identifier contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell,sisu_mark matchgroup=sisu_html start="<ins>" end="</ins>" skip="\\\\\|\\'" oneline
87 syn region sisu_identifier contains=sisu_error matchgroup=sisu_html start="<del>" end="</del>" oneline
88 "% metaverse <:>
89 syn region sisu_content_alt contains=sisu_strikeout,sisu_number,sisu_control,sisu_identifier,sisu_error,@Spell matchgroup=sisu_contain start="<:Table.\{-}>" end="<:Table[-_]end>"
90 syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>" 90 syn region sisu_content_alt contains=sisu_error matchgroup=sisu_contain start="<:code>" end="<:code[-_]end>"
91 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,sisu_error_spell,@Spell matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>" 91 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,@Spell matchgroup=sisu_contain start="<:alt>" end="<:alt[-_]end>"
92 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,sisu_error_spell,@Spell matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>" 92 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,@Spell matchgroup=sisu_contain start="<:poem>" end="<:poem[-_]end>"
93 "% 6 Expensive Mode 93 "% 6 Expensive Mode
94 " Expensive Mode: 94 " Expensive Mode:
95 if !exists("sisu_no_expensive") 95 if !exists("sisu_no_expensive")
96 else " not Expensive 96 else " not Expensive
97 syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline 97 syn region sisu_content_alt matchgroup=sisu_control start="^\s*def\s" matchgroup=NONE end="[?!]\|\>" skip="\.\|\(::\)" oneline
158 HiLink sisu_mark Identifier 158 HiLink sisu_mark Identifier
159 HiLink sisu_break Structure 159 HiLink sisu_break Structure
160 HiLink sisu_html Type 160 HiLink sisu_html Type
161 HiLink sisu_action Identifier 161 HiLink sisu_action Identifier
162 HiLink sisu_comment Comment 162 HiLink sisu_comment Comment
163 HiLink sisu_error_spell SpellErrors "line does nothing
164 " HiLink sisu_error_spell ErrorMsg
165 HiLink sisu_error_wspace Error 163 HiLink sisu_error_wspace Error
166 HiLink sisu_error Error 164 HiLink sisu_error Error
167 delcommand HiLink 165 delcommand HiLink
168 endif 166 endif
169 let b:current_syntax = "sisu" 167 let b:current_syntax = "sisu"