xref: /vim-8.2.3635/runtime/syntax/texmf.vim (revision 89bcfda6)
1" 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) <[email protected]>
5" Last Change: 2001-05-13
6" URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim
7
8" Setup
9" quit when a syntax file was already loaded
10if exists("b:current_syntax")
11  finish
12endif
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
45command -nargs=+ HiLink hi def link <args>
46
47HiLink texmfComment Comment
48HiLink texmfTodo Todo
49
50HiLink texmfPassedParameter texmfVariable
51HiLink texmfVariable Identifier
52
53HiLink texmfNumber Number
54HiLink texmfString String
55
56HiLink texmfLHSStart texmfLHS
57HiLink texmfLHSVariable texmfLHS
58HiLink texmfLHSDot texmfLHS
59HiLink texmfLHS Type
60
61HiLink texmfEquals Normal
62
63HiLink texmfBraceBrace texmfDelimiter
64HiLink texmfComma texmfDelimiter
65HiLink texmfColons texmfDelimiter
66HiLink texmfDelimiter Preproc
67
68HiLink texmfDoubleExclam Statement
69HiLink texmfSpecial Special
70
71HiLink texmfBraceError texmfError
72HiLink texmfError Error
73
74delcommand HiLink
75
76let b:current_syntax = "texmf"
77