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 61command -nargs=+ HiLink hi def link <args> 62 63HiLink gpConditional Conditional 64HiLink gpRepeat Repeat 65HiLink gpError Error 66HiLink gpParenError gpError 67HiLink gpInParen gpError 68HiLink gpStatement Statement 69HiLink gpString String 70HiLink gpComment Comment 71HiLink gpInterface Type 72HiLink gpInput Type 73HiLink gpInterfaceKey Statement 74HiLink gpFunction Function 75HiLink gpScope Type 76" contained ones 77HiLink gpSpecial Special 78HiLink gpTodo Todo 79HiLink gpArgs Type 80delcommand HiLink 81 82let b:current_syntax = "gp" 83let &cpo = s:cpo_save 84unlet s:cpo_save 85" vim: ts=8 86