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