Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 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 |
| 7 | |
| 8 | " Setup |
| 9 | if version >= 600 |
| 10 | if exists("b:current_syntax") |
| 11 | finish |
| 12 | endif |
| 13 | else |
| 14 | syntax clear |
| 15 | endif |
| 16 | |
| 17 | syn case match |
| 18 | |
| 19 | " Comments |
| 20 | syn match texmfComment "%..\+$" contains=texmfTodo |
| 21 | syn match texmfComment "%\s*$" contains=texmfTodo |
| 22 | syn keyword texmfTodo TODO FIXME XXX NOT contained |
| 23 | |
| 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 |
| 31 | |
| 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 |
| 37 | |
| 38 | " Specialities |
| 39 | syn match texmfComma "," contained |
| 40 | syn match texmfColons ":\|;" |
| 41 | syn match texmfDoubleExclam "!!" contained |
| 42 | |
| 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 "}" |
| 46 | |
| 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 |
| 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 |
| 84 | endif |
| 85 | |
| 86 | let b:current_syntax = "texmf" |