neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

texmf.vim (2281B)


      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 " quit when a syntax file was already loaded
     10 if exists("b:current_syntax")
     11  finish
     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
     45 
     46 hi def link texmfComment Comment
     47 hi def link texmfTodo Todo
     48 
     49 hi def link texmfPassedParameter texmfVariable
     50 hi def link texmfVariable Identifier
     51 
     52 hi def link texmfNumber Number
     53 hi def link texmfString String
     54 
     55 hi def link texmfLHSStart texmfLHS
     56 hi def link texmfLHSVariable texmfLHS
     57 hi def link texmfLHSDot texmfLHS
     58 hi def link texmfLHS Type
     59 
     60 hi def link texmfEquals Normal
     61 
     62 hi def link texmfBraceBrace texmfDelimiter
     63 hi def link texmfComma texmfDelimiter
     64 hi def link texmfColons texmfDelimiter
     65 hi def link texmfDelimiter Preproc
     66 
     67 hi def link texmfDoubleExclam Statement
     68 hi def link texmfSpecial Special
     69 
     70 hi def link texmfBraceError texmfError
     71 hi def link texmfError Error
     72 
     73 
     74 let b:current_syntax = "texmf"