Mercurial > vim
annotate runtime/syntax/gp.vim @ 16459:4ea761ce795b v8.1.1234
patch 8.1.1234: swap file test fails on MS-Windows
commit https://github.com/vim/vim/commit/701df4eb64ae9945c63f83621b54aa69e1336a79
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Apr 28 23:07:18 2019 +0200
patch 8.1.1234: swap file test fails on MS-Windows
Problem: Swap file test fails on MS-Windows.
Solution: Only compare the tail of the file names.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 28 Apr 2019 23:15:07 +0200 |
parents | 46763b01cd9a |
children | 2cbc8ebb8de5 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
3281 | 2 " Language: gp (version 2.5) |
827 | 3 " Maintainer: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr> |
3281 | 4 " Last change: 2012 Jan 08 |
827 | 5 " URL: http://pari.math.u-bordeaux.fr |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3281
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3281
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
3281 | 12 let s:cpo_save = &cpo |
13 set cpo&vim | |
14 | |
827 | 15 " control statements |
7 | 16 syntax keyword gpStatement break return next |
17 syntax keyword gpConditional if | |
3281 | 18 syntax keyword gpRepeat until while for fordiv forell forprime |
19 syntax keyword gpRepeat forsubgroup forstep forvec | |
827 | 20 " storage class |
1619 | 21 syntax keyword gpScope my local global |
827 | 22 " defaults |
3281 | 23 syntax keyword gpInterfaceKey breakloop colors compatible |
24 syntax keyword gpInterfaceKey datadir debug debugfiles debugmem | |
25 syntax keyword gpInterfaceKey echo factor_add_primes factor_proven format | |
26 syntax keyword gpInterfaceKey graphcolormap graphcolors | |
27 syntax keyword gpInterfaceKey help histfile histsize | |
28 syntax keyword gpInterfaceKey lines linewrap log logfile new_galois_format | |
827 | 29 syntax keyword gpInterfaceKey output parisize path prettyprinter primelimit |
3281 | 30 syntax keyword gpInterfaceKey prompt prompt_cont psfile |
31 syntax keyword gpInterfaceKey readline realprecision recover | |
32 syntax keyword gpInterfaceKey secure seriesprecision simplify strictmatch | |
33 syntax keyword gpInterfaceKey TeXstyle timer | |
7 | 34 |
3281 | 35 syntax match gpInterface "^\s*\\[a-z].*" |
7 | 36 syntax keyword gpInterface default |
37 syntax keyword gpInput read input | |
38 | |
39 " functions | |
40 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*[^ \t=]"me=e-1 contains=gpFunction,gpArgs | |
41 syntax match gpFunRegion "^\s*[a-zA-Z][_a-zA-Z0-9]*(.*)\s*=\s*$" contains=gpFunction,gpArgs | |
42 syntax match gpArgs contained "[a-zA-Z][_a-zA-Z0-9]*" | |
43 syntax 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 | |
47 syntax match gpSpecial contained "\\[ent\\]" | |
48 syntax region gpString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=gpSpecial | |
49 | |
50 "comments | |
51 syntax region gpComment start="/\*" end="\*/" contains=gpTodo | |
52 syntax match gpComment "\\\\.*" contains=gpTodo | |
53 syntax keyword gpTodo contained TODO | |
54 syntax sync ccomment gpComment minlines=10 | |
55 | |
56 "catch errors caused by wrong parenthesis | |
57 syntax region gpParen transparent start='(' end=')' contains=ALLBUT,gpParenError,gpTodo,gpFunction,gpArgs,gpSpecial | |
58 syntax match gpParenError ")" | |
59 syntax match gpInParen contained "[{}]" | |
60 | |
61 | |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
62 hi def link gpConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
63 hi def link gpRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
64 hi def link gpError Error |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
65 hi def link gpParenError gpError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
66 hi def link gpInParen gpError |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
67 hi def link gpStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
68 hi def link gpString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
69 hi def link gpComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
70 hi def link gpInterface Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
71 hi def link gpInput Type |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
72 hi def link gpInterfaceKey Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
73 hi def link gpFunction Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
74 hi def link gpScope Type |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3281
diff
changeset
|
75 " contained ones |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
76 hi def link gpSpecial Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
77 hi def link gpTodo Todo |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
78 hi def link gpArgs Type |
7 | 79 |
80 let b:current_syntax = "gp" | |
3281 | 81 let &cpo = s:cpo_save |
82 unlet s:cpo_save | |
7 | 83 " vim: ts=8 |