blob: d1268faff747eae30fa75ebf929af4e0c75fc808 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" This is a GENERATED FILE. Please always refer to source file at the URI below.
3" Language: Web2C TeX texmf.cnf configuration file
4" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
5" Last Change: 2001-05-13
6" URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim
7
8" Setup
Bram Moolenaar89bcfda2016-08-30 23:26:57 +02009" quit when a syntax file was already loaded
10if exists("b:current_syntax")
11 finish
Bram Moolenaar071d4272004-06-13 20:20:40 +000012endif
13
14syn case match
15
16" Comments
17syn match texmfComment "%..\+$" contains=texmfTodo
18syn match texmfComment "%\s*$" contains=texmfTodo
19syn keyword texmfTodo TODO FIXME XXX NOT contained
20
21" Constants and parameters
22syn match texmfPassedParameter "[-+]\=%\w\W"
23syn match texmfPassedParameter "[-+]\=%\w$"
24syn match texmfNumber "\<\d\+\>"
25syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)"
26syn match texmfSpecial +\\"\|\\$+
27syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter
28
29" Assignments
30syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals
31syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals
32syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable
33syn match texmfEquals "\s*=" contained
34
35" Specialities
36syn match texmfComma "," contained
37syn match texmfColons ":\|;"
38syn match texmfDoubleExclam "!!" contained
39
40" Catch errors caused by wrong parenthesization
41syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent
42syn match texmfBraceError "}"
43
44" Define the default highlighting
Bram Moolenaar071d4272004-06-13 20:20:40 +000045
Bram Moolenaarf37506f2016-08-31 22:22:10 +020046hi def link texmfComment Comment
47hi def link texmfTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +000048
Bram Moolenaarf37506f2016-08-31 22:22:10 +020049hi def link texmfPassedParameter texmfVariable
50hi def link texmfVariable Identifier
Bram Moolenaar071d4272004-06-13 20:20:40 +000051
Bram Moolenaarf37506f2016-08-31 22:22:10 +020052hi def link texmfNumber Number
53hi def link texmfString String
Bram Moolenaar071d4272004-06-13 20:20:40 +000054
Bram Moolenaarf37506f2016-08-31 22:22:10 +020055hi def link texmfLHSStart texmfLHS
56hi def link texmfLHSVariable texmfLHS
57hi def link texmfLHSDot texmfLHS
58hi def link texmfLHS Type
Bram Moolenaar071d4272004-06-13 20:20:40 +000059
Bram Moolenaarf37506f2016-08-31 22:22:10 +020060hi def link texmfEquals Normal
Bram Moolenaar071d4272004-06-13 20:20:40 +000061
Bram Moolenaarf37506f2016-08-31 22:22:10 +020062hi def link texmfBraceBrace texmfDelimiter
63hi def link texmfComma texmfDelimiter
64hi def link texmfColons texmfDelimiter
65hi def link texmfDelimiter Preproc
Bram Moolenaar071d4272004-06-13 20:20:40 +000066
Bram Moolenaarf37506f2016-08-31 22:22:10 +020067hi def link texmfDoubleExclam Statement
68hi def link texmfSpecial Special
Bram Moolenaar071d4272004-06-13 20:20:40 +000069
Bram Moolenaarf37506f2016-08-31 22:22:10 +020070hi def link texmfBraceError texmfError
71hi def link texmfError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +000072
Bram Moolenaar071d4272004-06-13 20:20:40 +000073
74let b:current_syntax = "texmf"