1" Vim syntax file 2" Language: gp (version 2.5) 3" Maintainer: Karim Belabas <[email protected]> 4" Last change: 2012 Jan 08 5" URL: http://pari.math.u-bordeaux.fr 6 7" quit when a syntax file was already loaded 8if exists("b:current_syntax") 9 finish 10endif 11 12let s:cpo_save = &cpo 13set cpo&vim 14 15" control statements 16syntax keyword gpStatement break return next 17syntax keyword gpConditional if 18syntax keyword gpRepeat until while for fordiv forell forprime 19syntax keyword gpRepeat forsubgroup forstep forvec 20" storage class 21syntax keyword gpScope my local global 22" defaults 23syntax keyword gpInterfaceKey breakloop colors compatible 24syntax keyword gpInterfaceKey datadir debug debugfiles debugmem 25syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format 26syntax keyword gpInterfaceKey graphcolormap graphcolors 27syntax keyword gpInterfaceKey help histfile histsize 28syntax keyword gpInterfaceKey lines linewrap log logfile new_galois_format 29syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit 30syntax keyword gpInterfaceKey prompt prompt_cont psfile 31syntax keyword gpInterfaceKey readline realprecision recover 32syntax keyword gpInterfaceKey secure seriesprecision simplify strictmatch 33syntax keyword gpInterfaceKey TeXstyle timer 34 35syntax match gpInterface "^\s*\\[a-z].*" 36syntax keyword gpInterface default 37syntax keyword gpInput read input 38 39" functions 40syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs 41syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs 42syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*" 43syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1 44 45" String and Character constants 46" Highlight special (backslash'ed) characters differently 47syntax match gpSpecial contained "\\[ent\\]" 48syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial 49 50"comments 51syntax region gpComment start="/\*" end="\*/" contains=gpTodo 52syntax match gpComment "\\\\.*" contains=gpTodo 53syntax keyword gpTodo contained TODO 54syntax sync ccomment gpComment minlines=10 55 56"catch errors caused by wrong parenthesis 57syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial 58syntax match gpParenError ")" 59syntax match gpInParen contained "[{}]" 60 61 62hi def link gpConditional Conditional 63hi def link gpRepeat Repeat 64hi def link gpError Error 65hi def link gpParenError gpError 66hi def link gpInParen gpError 67hi def link gpStatement Statement 68hi def link gpString String 69hi def link gpComment Comment 70hi def link gpInterface Type 71hi def link gpInput Type 72hi def link gpInterfaceKey Statement 73hi def link gpFunction Function 74hi def link gpScope Type 75" contained ones 76hi def link gpSpecial Special 77hi def link gpTodo Todo 78hi def link gpArgs Type 79 80let b:current_syntax = "gp" 81let &cpo = s:cpo_save 82unlet s:cpo_save 83" vim: ts=8 84