annotate runtime/syntax/lout.vim @ 881:48775ea99f24 v7.0.007

updated for version 7.0-007
author vimboss
date Sat, 13 May 2006 11:09:22 +0000
parents 3fc0f57ecb91
children 7bc41231fbc7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Lout
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Christian V. J. Brüssow <cvjb@cvjb.de>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: Son 22 Jun 2003 20:43:26 CEST
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Filenames: *.lout,*.lt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " URL: http://www.cvjb.de/comp/vim/lout.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " $Id$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " Lout: Basser Lout document formatting system.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Lout is case sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 " Synchronization, I know it is a huge number, but normal texts can be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " _very_ long ;-)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn sync lines=1000
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Characters allowed in keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " I don't know if 128-255 are allowed in ANS-FORHT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 if version >= 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 setlocal iskeyword=@,48-57,.,@-@,_,192-255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 set iskeyword=@,48-57,.,@-@,_,192-255
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Some special keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword loutTodo contained TODO lout Lout LOUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword loutDefine def macro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Some big structures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword loutKeyword @Begin @End @Figure @Tab
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword loutKeyword @Book @Doc @Document @Report
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword loutKeyword @Introduction @Abstract @Appendix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " All kind of Lout keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match loutFunction '\<@[^ \t{}]\+\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " Braces -- Don`t edit these lines!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match loutMBraces '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match loutIBraces '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match loutBBrace '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match loutBIBraces '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match loutHeads '[{}]'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " Unmatched braces.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match loutBraceError '}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " End of multi-line definitions, like @Document, @Report and @Book.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match loutEOmlDef '^//$'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " Grouping of parameters and objects.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " The NULL object has a special meaning
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword loutNULL {}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn region loutComment start='\#' end='$' contains=loutTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " Double quotes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " ISO-LATIN-1 characters created with @Char, or Adobe symbols
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 " created with @Sym
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " Include files
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match loutInclude '@IncludeGraphic\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " Tags
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn region loutTag start='@Tag\s*{' end='}'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " Equations
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match loutMath '@Eq\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " Fonts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn match loutItalic '@I\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match loutBold '@B\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match loutBoldItalic '@BI\s\+\k\+'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 if version >= 508 || !exists("did_lout_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 let did_lout_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " The default methods for highlighting. Can be overrriden later.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 HiLink loutTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 HiLink loutDefine Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 HiLink loutEOmlDef Define
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 HiLink loutFunction Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 HiLink loutBraceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 HiLink loutNULL Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 HiLink loutComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 HiLink loutSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 HiLink loutSymbols Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 HiLink loutInclude Include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 HiLink loutKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 HiLink loutTag Tag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 HiLink loutMath Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " HiLink Not really needed here, but I think it is more consistent.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 HiLink loutMBraces loutMath
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 hi loutItalic term=italic cterm=italic gui=italic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 HiLink loutIBraces loutItalic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 hi loutBold term=bold cterm=bold gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 HiLink loutBBraces loutBold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 HiLink loutBIBraces loutBoldItalic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 hi loutHeadings term=bold cterm=bold guifg=indianred
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 HiLink loutHeads loutHeadings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 let b:current_syntax = "lout"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 " vim:ts=8:sw=4:nocindent:smartindent: