Mercurial > vim
comparison runtime/syntax/gp.vim @ 32955:2cbc8ebb8de5
runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (#12884)
Commit: https://github.com/vim/vim/commit/c6d533b0ad565a610a48386b0ad72cc591010fcb
Author: Karim Belabas <Karim.belabas@math.u-bordeaux.fr>
Date: Tue Aug 22 20:25:06 2023 +0200
runtime(gp): update gp.vim syntax file for the GP language (version 2.15) (https://github.com/vim/vim/issues/12884)
- add missing defaults
- add missing control structures (incl. parallelism)
- add missing scope declarations
- whitespace edits (remove extra tabs)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 22 Aug 2023 20:30:04 +0200 |
parents | 46763b01cd9a |
children |
comparison
equal
deleted
inserted
replaced
32954:e8db0e2c86e6 | 32955:2cbc8ebb8de5 |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: gp (version 2.5) | 2 " Language: gp (version 2.15) |
3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> | 3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> |
4 " Last change: 2012 Jan 08 | 4 " Last change: 2023 Aug 22 |
5 " URL: http://pari.math.u-bordeaux.fr | 5 " URL: http://pari.math.u-bordeaux.fr |
6 | 6 |
7 " quit when a syntax file was already loaded | 7 " quit when a syntax file was already loaded |
8 if exists("b:current_syntax") | 8 if exists("b:current_syntax") |
9 finish | 9 finish |
12 let s:cpo_save = &cpo | 12 let s:cpo_save = &cpo |
13 set cpo&vim | 13 set cpo&vim |
14 | 14 |
15 " control statements | 15 " control statements |
16 syntax keyword gpStatement break return next | 16 syntax keyword gpStatement break return next |
17 syntax keyword gpConditional if | 17 syntax keyword gpConditional if iferr |
18 syntax keyword gpRepeat until while for fordiv forell forprime | 18 syntax keyword gpRepeat until while for forcomposite fordiv |
19 syntax keyword gpRepeat forsubgroup forstep forvec | 19 syntax keyword gpRepeat fordivfactored foreach forell forfactored |
20 syntax keyword gpRepeat forpart forperm forprime forprimestep forqfvec | |
21 syntax keyword gpRepeat forsquarefree forstep forsubgroup forsubset | |
22 syntax keyword gpRepeat forvec | |
23 syntax keyword gpRepeat parfor parforeach parforprime parforprimestep | |
24 syntax keyword gpRepeat parforvec | |
20 " storage class | 25 " storage class |
21 syntax keyword gpScope my local global | 26 syntax keyword gpScope my local global export exportall |
22 " defaults | 27 " defaults |
23 syntax keyword gpInterfaceKey breakloop colors compatible | 28 syntax keyword gpInterfaceKey breakloop colors compatible |
24 syntax keyword gpInterfaceKey datadir debug debugfiles debugmem | 29 syntax keyword gpInterfaceKey datadir debug debugfiles debugmem |
25 syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format | 30 syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format |
26 syntax keyword gpInterfaceKey graphcolormap graphcolors | 31 syntax keyword gpInterfaceKey graphcolormap graphcolors |
27 syntax keyword gpInterfaceKey help histfile histsize | 32 syntax keyword gpInterfaceKey help histfile histsize |
28 syntax keyword gpInterfaceKey lines linewrap log logfile new_galois_format | 33 syntax keyword gpInterfaceKey lines linewrap log logfile nbthreads |
29 syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit | 34 syntax keyword gpInterfaceKey new_galois_format output parisize parisizemax |
30 syntax keyword gpInterfaceKey prompt prompt_cont psfile | 35 syntax keyword gpInterfaceKey path plothsizes prettyprinter primelimit prompt |
31 syntax keyword gpInterfaceKey readline realprecision recover | 36 syntax keyword gpInterfaceKey prompt_cont psfile readline realbitprecision |
32 syntax keyword gpInterfaceKey secure seriesprecision simplify strictmatch | 37 syntax keyword gpInterfaceKey realprecision recover secure seriesprecision |
33 syntax keyword gpInterfaceKey TeXstyle timer | 38 syntax keyword gpInterfaceKey simplify sopath strictmatch TeXstyle |
39 syntax keyword gpInterfaceKey threadsize threadsizemax timer | |
34 | 40 |
35 syntax match gpInterface "^\s*\\[a-z].*" | 41 syntax match gpInterface "^\s*\\[a-z].*" |
36 syntax keyword gpInterface default | 42 syntax keyword gpInterface default |
37 syntax keyword gpInput read input | 43 syntax keyword gpInput read input |
38 | 44 |
56 "catch errors caused by wrong parenthesis | 62 "catch errors caused by wrong parenthesis |
57 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial | 63 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial |
58 syntax match gpParenError ")" | 64 syntax match gpParenError ")" |
59 syntax match gpInParen contained "[{}]" | 65 syntax match gpInParen contained "[{}]" |
60 | 66 |
61 | 67 hi def link gpConditional Conditional |
62 hi def link gpConditional Conditional | |
63 hi def link gpRepeat Repeat | 68 hi def link gpRepeat Repeat |
64 hi def link gpError Error | 69 hi def link gpError Error |
65 hi def link gpParenError gpError | 70 hi def link gpParenError gpError |
66 hi def link gpInParen gpError | 71 hi def link gpInParen gpError |
67 hi def link gpStatement Statement | 72 hi def link gpStatement Statement |
68 hi def link gpString String | 73 hi def link gpString String |
69 hi def link gpComment Comment | 74 hi def link gpComment Comment |
70 hi def link gpInterface Type | 75 hi def link gpInterface Type |
71 hi def link gpInput Type | 76 hi def link gpInput Type |
72 hi def link gpInterfaceKey Statement | 77 hi def link gpInterfaceKey Statement |
73 hi def link gpFunction Function | 78 hi def link gpFunction Function |
74 hi def link gpScope Type | 79 hi def link gpScope Type |
75 " contained ones | 80 " contained ones |
76 hi def link gpSpecial Special | 81 hi def link gpSpecial Special |
77 hi def link gpTodo Todo | 82 hi def link gpTodo Todo |
78 hi def link gpArgs Type | 83 hi def link gpArgs Type |
79 | 84 |
80 let b:current_syntax = "gp" | 85 let b:current_syntax = "gp" |
81 let &cpo = s:cpo_save | 86 let &cpo = s:cpo_save |
82 unlet s:cpo_save | 87 unlet s:cpo_save |
83 " vim: ts=8 | 88 " vim: ts=8 |