blob: 5a381c7cd62c72c836190f8ee2ba1244a44c8066 [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: gnuplot 3.8i.0
3" Maintainer: John Hoelzel johnh51@users.sourceforge.net
4" Last Change: Mon May 26 02:33:33 UTC 2003
5" Filenames: *.gpi *.gih scripts: #!*gnuplot
6" URL: http://johnh51.get.to/vim/syntax/gnuplot.vim
7"
8
9" thanks to "David Necas (Yeti)" <yeti@physics.muni.cz> for heads up - working on more changes .
10" *.gpi = GnuPlot Input - what I use because there is no other guideline. jeh 11/2000
11" *.gih = makes using cut/pasting from gnuplot.gih easier ...
12" #!*gnuplot = for Linux bash shell scripts of gnuplot commands.
13" emacs used a suffix of '<gp?>'
14" gnuplot demo files show no preference.
15" I will post mail and newsgroup comments on a standard suffix in 'URL' directory.
16
17" For version 5.x: Clear all syntax items
18" For version 6.x: Quit when a syntax file was already loaded
19if version < 600
20 syntax clear
21elseif exists("b:current_syntax")
22 finish
23endif
24
25" some shortened names to make demo files look clean... jeh. 11/2000
26" demos -> 3.8i ... jeh. 5/2003 - a work in progress...
27
28" commands
29
30syn keyword gnuplotStatement cd call clear exit set unset plot splot help
31syn keyword gnuplotStatement load pause quit fit rep[lot] if
32syn keyword gnuplotStatement FIT_LIMIT FIT_MAXITER FIT_START_LAMBDA
33syn keyword gnuplotStatement FIT_LAMBDA_FACTOR FIT_LOG FIT_SCRIPT
34syn keyword gnuplotStatement print pwd reread reset save show test ! functions var
35syn keyword gnuplotConditional if
36" if is cond + stmt - ok?
37
38" numbers fm c.vim
39
40" integer number, or floating point number without a dot and with "f".
41syn case ignore
42syn match gnuplotNumber "\<[0-9]\+\(u\=l\=\|lu\|f\)\>"
43" floating point number, with dot, optional exponent
44syn match gnuplotFloat "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
45" floating point number, starting with a dot, optional exponent
46syn match gnuplotFloat "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
47" floating point number, without dot, with exponent
48syn match gnuplotFloat "\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>"
49" hex number
50syn match gnuplotNumber "\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
51syn case match
52" flag an octal number with wrong digits by not hilighting
53syn match gnuplotOctalError "\<0[0-7]*[89]"
54
55" plot args
56
57syn keyword gnuplotType u[sing] tit[le] notit[le] wi[th] steps fs[teps]
58syn keyword gnuplotType title notitle t
59syn keyword gnuplotType with w
60syn keyword gnuplotType li[nes] l
61" t - too much? w - too much? l - too much?
62syn keyword gnuplotType linespoints via
63
64" funcs
65
66syn keyword gnuplotFunc abs acos acosh arg asin asinh atan atanh atan2
67syn keyword gnuplotFunc besj0 besj1 besy0 besy1
68syn keyword gnuplotFunc ceil column cos cosh erf erfc exp floor gamma
69syn keyword gnuplotFunc ibeta inverf igamma imag invnorm int lgamma
70syn keyword gnuplotFunc log log10 norm rand real sgn sin sinh sqrt tan
71syn keyword gnuplotFunc lambertw
72syn keyword gnuplotFunc tanh valid
73syn keyword gnuplotFunc tm_hour tm_mday tm_min tm_mon tm_sec
74syn keyword gnuplotFunc tm_wday tm_yday tm_year
75
76" set vars
77
78syn keyword gnuplotType xdata timefmt grid noytics ytics fs
79syn keyword gnuplotType logscale time notime mxtics nomxtics style mcbtics
80syn keyword gnuplotType nologscale
81syn keyword gnuplotType axes x1y2 unique acs[plines]
82syn keyword gnuplotType size origin multiplot xtics xr[ange] yr[ange] square nosquare ratio noratio
83syn keyword gnuplotType binary matrix index every thru sm[ooth]
84syn keyword gnuplotType all angles degrees radians
85syn keyword gnuplotType arrow noarrow autoscale noautoscale arrowstyle
86" autoscale args = x y xy z t ymin ... - too much?
87" needs code to: using title vs autoscale t
88syn keyword gnuplotType x y z zcb
89syn keyword gnuplotType linear cubicspline bspline order level[s]
90syn keyword gnuplotType auto disc[rete] incr[emental] from to head nohead
91syn keyword gnuplotType graph base both nosurface table out[put] data
92syn keyword gnuplotType bar border noborder boxwidth
93syn keyword gnuplotType clabel noclabel clip noclip cntrp[aram]
94syn keyword gnuplotType contour nocontour
95syn keyword gnuplotType dgrid3d nodgrid3d dummy encoding format
96" set encoding args not included - yet.
97syn keyword gnuplotType function grid nogrid hidden[3d] nohidden[3d] isosample[s] key nokey
98syn keyword gnuplotType historysize nohistorysize
99syn keyword gnuplotType defaults offset nooffset trianglepattern undefined noundefined altdiagonal bentover noaltdiagonal nobentover
100syn keyword gnuplotType left right top bottom outside below samplen spacing width height box nobox linestyle ls linetype lt linewidth lw
101syn keyword gnuplotType Left Right autotitles noautotitles enhanced noenhanced
102syn keyword gnuplotType isosamples
103syn keyword gnuplotType label nolabel logscale nolog[scale] missing center font locale
104syn keyword gnuplotType mapping margin bmargin lmargin rmargin tmargin spherical cylindrical cartesian
105syn keyword gnuplotType linestyle nolinestyle linetype lt linewidth lw pointtype pt pointsize ps
106syn keyword gnuplotType mouse nomouse
107syn keyword gnuplotType nooffsets data candlesticks financebars linespoints lp vector nosurface
108syn keyword gnuplotType term[inal] linux aed767 aed512 gpic
109syn keyword gnuplotType regis tek410x tek40 vttek kc-tek40xx
110syn keyword gnuplotType km-tek40xx selanar bitgraph xlib x11 X11
111" x11 args
112syn keyword gnuplotType aifm cgm dumb fig gif small large size nofontlist winword6 corel dxf emf
113syn keyword gnuplotType hpgl
114" syn keyword gnuplotType transparent hp2623a hp2648 hp500c pcl5 why jeh
115syn keyword gnuplotType hp2623a hp2648 hp500c pcl5
116syn match gnuplotType "\<transparent\>"
117syn keyword gnuplotType hpljii hpdj hppj imagen mif pbm png svg
118syn keyword gnuplotType postscript enhanced_postscript qms table
119" postscript editing values?
120syn keyword gnuplotType tgif tkcanvas epson-180dpi epson-60dpi
121syn keyword gnuplotType epson-lx800 nec-cp6 okidata starc
122syn keyword gnuplotType tandy-60dpi latex emtex pslatex pstex epslatex
123syn keyword gnuplotType eepic tpic pstricks texdraw mf metafont mpost mp
124syn keyword gnuplotType timestamp notimestamp
125syn keyword gnuplotType variables version
126syn keyword gnuplotType x2data y2data ydata zdata
127syn keyword gnuplotType reverse writeback noreverse nowriteback
128syn keyword gnuplotType axis mirror autofreq nomirror rotate autofreq norotate
129syn keyword gnuplotType update
130syn keyword gnuplotType multiplot nomultiplot mytics
131syn keyword gnuplotType nomytics mztics nomztics mx2tics nomx2tics
132syn keyword gnuplotType my2tics nomy2tics offsets origin output
133syn keyword gnuplotType para[metric] nopara[metric] pointsize polar nopolar
134syn keyword gnuplotType zrange x2range y2range rrange cbrange
135syn keyword gnuplotType trange urange vrange sample[s] size
136syn keyword gnuplotType bezier boxerrorbars boxes bargraph bar[s]
137syn keyword gnuplotType boxxy[errorbars] csplines dots fsteps histeps impulses
138syn keyword gnuplotType line[s] linesp[oints] points poiinttype sbezier splines steps
139" w lt lw ls = optional
140syn keyword gnuplotType vectors xerr[orbars] xyerr[orbars] yerr[orbars] financebars candlesticks vector
Bram Moolenaara6557602006-02-04 22:43:20 +0000141syn keyword gnuplotType errorb[ars] surface
Bram Moolenaar071d4272004-06-13 20:20:40 +0000142syn keyword gnuplotType filledcurve[s] pm3d x1 x2 y1 y2 xy closed
143syn keyword gnuplotType at pi front
144syn keyword gnuplotType errorlines xerrorlines yerrorlines xyerrorlines
145syn keyword gnuplotType tics ticslevel ticscale time timefmt view
146syn keyword gnuplotType xdata xdtics noxdtics ydtics noydtics
147syn keyword gnuplotType zdtics nozdtics x2dtics nox2dtics y2dtics noy2dtics
148syn keyword gnuplotType xlab[el] ylab[el] zlab[el] cblab[el] x2label y2label xmtics
149syn keyword gnuplotType xmtics noxmtics ymtics noymtics zmtics nozmtics
150syn keyword gnuplotType x2mtics nox2mtics y2mtics noy2mtics
151syn keyword gnuplotType cbdtics nocbdtics cbmtics nocbmtics cbtics nocbtics
152syn keyword gnuplotType xtics noxtics ytics noytics
153syn keyword gnuplotType ztics noztics x2tics nox2tics
154syn keyword gnuplotType y2tics noy2tics zero nozero zeroaxis nozeroaxis
155syn keyword gnuplotType xzeroaxis noxzeroaxis yzeroaxis noyzeroaxis
156syn keyword gnuplotType x2zeroaxis nox2zeroaxis y2zeroaxis noy2zeroaxis
157syn keyword gnuplotType angles one two fill empty solid pattern
158syn keyword gnuplotType default
159syn keyword gnuplotType scansautomatic flush b[egin] noftriangles implicit
160" b too much? - used in demo
161syn keyword gnuplotType palette positive negative ps_allcF nops_allcF maxcolors
162syn keyword gnuplotType push fontfile pop
163syn keyword gnuplotType rgbformulae defined file color model gradient colornames
164syn keyword gnuplotType RGB HSV CMY YIQ XYZ
165syn keyword gnuplotType colorbox vertical horizontal user bdefault
166syn keyword gnuplotType loadpath fontpath decimalsign in out
167
168" comments + strings
169syn region gnuplotComment start="#" end="$"
170syn region gnuplotComment start=+"+ skip=+\\"+ end=+"+
171syn region gnuplotComment start=+'+ end=+'+
172
173" Define the default highlighting.
174" For version 5.7 and earlier: only when not done already
175" For version 5.8 and later: only when an item doesn't have highlighting yet
176if version >= 508 || !exists("did_gnuplot_syntax_inits")
177 if version < 508
178 let did_gnuplot_syntax_inits = 1
179 command -nargs=+ HiLink hi link <args>
180 else
181 command -nargs=+ HiLink hi def link <args>
182 endif
183
184 HiLink gnuplotStatement Statement
185 HiLink gnuplotConditional Conditional
186 HiLink gnuplotNumber Number
187 HiLink gnuplotFloat Float
188 HiLink gnuplotOctalError Error
189 HiLink gnuplotFunc Type
190 HiLink gnuplotType Type
191 HiLink gnuplotComment Comment
192
193 delcommand HiLink
194endif
195
196let b:current_syntax = "gnuplot"
197
198" vim: ts=8