Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / syntax / texmf.vim
blob7b91168f08a00b44a8ae74db8967dc8c7fb91bad
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) <yeti@physics.muni.cz>
5 " Last Change: 2001-05-13
6 " URL: http://physics.muni.cz/~yeti/download/syntax/texmf.vim
8 " Setup
9 if version >= 600
10   if exists("b:current_syntax")
11     finish
12   endif
13 else
14   syntax clear
15 endif
17 syn case match
19 " Comments
20 syn match texmfComment "%..\+$" contains=texmfTodo
21 syn match texmfComment "%\s*$" contains=texmfTodo
22 syn keyword texmfTodo TODO FIXME XXX NOT contained
24 " Constants and parameters
25 syn match texmfPassedParameter "[-+]\=%\w\W"
26 syn match texmfPassedParameter "[-+]\=%\w$"
27 syn match texmfNumber "\<\d\+\>"
28 syn match texmfVariable "\$\(\w\k*\|{\w\k*}\)"
29 syn match texmfSpecial +\\"\|\\$+
30 syn region texmfString start=+"+ end=+"+ skip=+\\"\\\\+ contains=texmfVariable,texmfSpecial,texmfPassedParameter
32 " Assignments
33 syn match texmfLHSStart "^\s*\w\k*" nextgroup=texmfLHSDot,texmfEquals
34 syn match texmfLHSVariable "\w\k*" contained nextgroup=texmfLHSDot,texmfEquals
35 syn match texmfLHSDot "\." contained nextgroup=texmfLHSVariable
36 syn match texmfEquals "\s*=" contained
38 " Specialities
39 syn match texmfComma "," contained
40 syn match texmfColons ":\|;"
41 syn match texmfDoubleExclam "!!" contained
43 " Catch errors caused by wrong parenthesization
44 syn region texmfBrace matchgroup=texmfBraceBrace start="{" end="}" contains=ALLBUT,texmfTodo,texmfBraceError,texmfLHSVariable,texmfLHSDot transparent
45 syn match texmfBraceError "}"
47 " Define the default highlighting
48 if 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
56   HiLink texmfComment Comment
57   HiLink texmfTodo Todo
59   HiLink texmfPassedParameter texmfVariable
60   HiLink texmfVariable Identifier
62   HiLink texmfNumber Number
63   HiLink texmfString String
65   HiLink texmfLHSStart texmfLHS
66   HiLink texmfLHSVariable texmfLHS
67   HiLink texmfLHSDot texmfLHS
68   HiLink texmfLHS Type
70   HiLink texmfEquals Normal
72   HiLink texmfBraceBrace texmfDelimiter
73   HiLink texmfComma texmfDelimiter
74   HiLink texmfColons texmfDelimiter
75   HiLink texmfDelimiter Preproc
77   HiLink texmfDoubleExclam Statement
78   HiLink texmfSpecial Special
80   HiLink texmfBraceError texmfError
81   HiLink texmfError Error
83   delcommand HiLink
84 endif
86 let b:current_syntax = "texmf"