7
|
1 " Vim syntax file
|
|
2 " Language: jgraph (graph plotting utility)
|
|
3 " Maintainer: Jonas Munsin jmunsin@iki.fi
|
|
4 " Last Change: 2003 May 04
|
|
5 " this syntax file is not yet complete
|
|
6
|
|
7
|
|
8 " For version 5.x: Clear all syntax items
|
|
9 " For version 6.x: Quit when a syntax file was already loaded
|
|
10 if version < 600
|
|
11 syntax clear
|
|
12 elseif exists("b:current_syntax")
|
|
13 finish
|
|
14 endif
|
|
15
|
|
16 syn case match
|
|
17
|
|
18 " comments
|
|
19 syn region jgraphComment start="(\* " end=" \*)"
|
|
20
|
|
21 syn keyword jgraphCmd newcurve newgraph marktype
|
|
22 syn keyword jgraphType xaxis yaxis
|
|
23
|
|
24 syn keyword jgraphType circle box diamond triangle x cross ellipse
|
|
25 syn keyword jgraphType xbar ybar text postscript eps none general
|
|
26
|
|
27 syn keyword jgraphType solid dotted dashed longdash dotdash dodotdash
|
|
28 syn keyword jgraphType dotdotdashdash pts
|
|
29
|
|
30 "integer number, or floating point number without a dot. - or no -
|
|
31 syn match jgraphNumber "\<-\=\d\+\>"
|
|
32 "floating point number, with dot - or no -
|
|
33 syn match jgraphNumber "\<-\=\d\+\.\d*\>"
|
|
34 "floating point number, starting with a dot - or no -
|
|
35 syn match jgraphNumber "\-\=\.\d\+\>"
|
|
36
|
|
37
|
|
38 " Define the default highlighting.
|
|
39 " For version 5.7 and earlier: only when not done already
|
|
40 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
41 if version >= 508 || !exists("did_jgraph_syn_inits")
|
|
42 if version < 508
|
|
43 let did_jgraph_syn_inits = 1
|
|
44 command -nargs=+ HiLink hi link <args>
|
|
45 else
|
|
46 command -nargs=+ HiLink hi def link <args>
|
|
47 endif
|
|
48
|
|
49 HiLink jgraphComment Comment
|
|
50 HiLink jgraphCmd Identifier
|
|
51 HiLink jgraphType Type
|
|
52 HiLink jgraphNumber Number
|
|
53
|
|
54 delcommand HiLink
|
|
55 endif
|
|
56
|
|
57
|
|
58 let b:current_syntax = "jgraph"
|