blob: 7b91168f08a00b44a8ae74db8967dc8c7fb91bad [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
9if version >= 600
10 if exists("b:current_syntax")
11 finish
12 endif
13else
14 syntax clear
15endif
16
17syn case match
18
19" Comments
20syn match texmfComment "%..\+$" contains=texmfTodo
21syn match texmfComment "%\s*$" contains=texmfTodo
22syn keyword texmfTodo TODO FIXME XXX NOT contained
23
24" Constants and parameters
25syn match texmfPassedParameter "[-+]\=%\w\W"
26syn match texmfPassedParameter "[-+]\=%\w$"
27syn match texmfNumber "\<\d\+\>"
28syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)"
29syn match texmfSpecial +\\"\|\\$+
30syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter
31
32" Assignments
33syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals
34syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals
35syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable
36syn match texmfEquals "\s*=" contained
37
38" Specialities
39syn match texmfComma "," contained
40syn match texmfColons ":\|;"
41syn match texmfDoubleExclam "!!" contained
42
43" Catch errors caused by wrong parenthesization
44syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent
45syn match texmfBraceError "}"
46
47" Define the default highlighting
48if version >= 508 || !exists("did_texmf_syntax_inits")
49 if version < 508
50 let did_texmf_syntax_inits = 1
51 command -nargs=+ HiLink hi link <args>
52 else
53 command -nargs=+ HiLink hi def link <args>
54 endif
55
56 HiLink texmfComment Comment
57 HiLink texmfTodo Todo
58
59 HiLink texmfPassedParameter texmfVariable
60 HiLink texmfVariable Identifier
61
62 HiLink texmfNumber Number
63 HiLink texmfString String
64
65 HiLink texmfLHSStart texmfLHS
66 HiLink texmfLHSVariable texmfLHS
67 HiLink texmfLHSDot texmfLHS
68 HiLink texmfLHS Type
69
70 HiLink texmfEquals Normal
71
72 HiLink texmfBraceBrace texmfDelimiter
73 HiLink texmfComma texmfDelimiter
74 HiLink texmfColons texmfDelimiter
75 HiLink texmfDelimiter Preproc
76
77 HiLink texmfDoubleExclam Statement
78 HiLink texmfSpecial Special
79
80 HiLink texmfBraceError texmfError
81 HiLink texmfError Error
82
83 delcommand HiLink
84endif
85
86let b:current_syntax = "texmf"