Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/gp.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children | e170173ecb68 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Language: gp (version 2.2) | |
3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> | |
4 " Last change: 2006 Apr 12 | |
5 " URL: http://pari.math.u-bordeaux.fr | |
6 | |
7 if version < 600 | |
8 syntax clear | |
9 elseif exists("b:current_syntax") | |
10 finish | |
11 endif | |
12 | |
13 " control statements | |
14 syntax keyword gpStatement break return next | |
15 syntax keyword gpConditional if | |
16 syntax keyword gpRepeat until while for fordiv forprime forstep forvec | |
17 " storage class | |
18 syntax keyword gpScope local global | |
19 " defaults | |
20 syntax keyword gpInterfaceKey colors compatible datadir debug debugfiles | |
21 syntax keyword gpInterfaceKey debugmem echo factor_add_primes format help | |
22 syntax keyword gpInterfaceKey histsize lines log logfile new_galois_format | |
23 syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit | |
24 syntax keyword gpInterfaceKey prompt prompt_cont psfile realprecision secure | |
25 syntax keyword gpInterfaceKey seriesprecision simplify strictmatch TeXstyle timer | |
26 | |
27 syntax match gpInterface "^\s*\\[a-z].*" | |
28 syntax keyword gpInterface default | |
29 syntax keyword gpInput read input | |
30 | |
31 " functions | |
32 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs | |
33 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs | |
34 syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*" | |
35 syntax match gpFunction contained "^\s*[a-zA-Z][_a-zA-Z0-9]*("me=e-1 | |
36 | |
37 " String and Character constants | |
38 " Highlight special (backslash'ed) characters differently | |
39 syntax match gpSpecial contained "\\[ent\\]" | |
40 syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial | |
41 | |
42 "comments | |
43 syntax region gpComment start="/\*" end="\*/" contains=gpTodo | |
44 syntax match gpComment "\\\\.*" contains=gpTodo | |
45 syntax keyword gpTodo contained TODO | |
46 syntax sync ccomment gpComment minlines=10 | |
47 | |
48 "catch errors caused by wrong parenthesis | |
49 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial | |
50 syntax match gpParenError ")" | |
51 syntax match gpInParen contained "[{}]" | |
52 | |
53 if version >= 508 || !exists("did_gp_syn_inits") | |
54 if version < 508 | |
55 let did_gp_syn_inits = 1 | |
56 command -nargs=+ HiLink hi link <args> | |
57 else | |
58 command -nargs=+ HiLink hi def link <args> | |
59 endif | |
60 | |
61 HiLink gpConditional Conditional | |
62 HiLink gpRepeat Repeat | |
63 HiLink gpError Error | |
64 HiLink gpParenError gpError | |
65 HiLink gpInParen gpError | |
66 HiLink gpStatement Statement | |
67 HiLink gpString String | |
68 HiLink gpComment Comment | |
69 HiLink gpInterface Type | |
70 HiLink gpInput Type | |
71 HiLink gpInterfaceKey Statement | |
72 HiLink gpFunction Function | |
73 HiLink gpScope Type | |
74 " contained ones | |
75 HiLink gpSpecial Special | |
76 HiLink gpTodo Todo | |
77 HiLink gpArgs Type | |
78 delcommand HiLink | |
79 endif | |
80 | |
81 let b:current_syntax = "gp" | |
82 " vim: ts=8 |