xref: /vim-8.2.3635/runtime/syntax/gnuplot.vim (revision e2db6c97)
1" Vim syntax file
2" Language:	gnuplot 4.7.0
3" Maintainer:	Andrew Rasmussen [email protected]
4" Original Maintainer:	John Hoelzel [email protected]
5" Last Change:	2014-02-24
6" Filenames:	*.gnu *.plt *.gpi *.gih *.gp *.gnuplot scripts: #!*gnuplot
7" URL:		http://www.vim.org/scripts/script.php?script_id=4873
8" Original URL:	http://johnh51.get.to/vim/syntax/gnuplot.vim
9
10" thanks to "David Necas (Yeti)" <[email protected]>
11
12" credit also to Jim Eberle <[email protected]>
13" for the script http://www.vim.org/scripts/script.php?script_id=1737
14
15" some shortened names to make demo files look clean... jeh. 11/2000
16" demos -> 3.8i ... jeh. 5/2003 - a work in progress...
17" added current commands, keywords, variables, todos, macros... amr 2014-02-24
18
19" For vim version 5.x: Clear all syntax items
20" For vim version 6.x: Quit when a syntax file was already loaded
21
22if version < 600
23  syntax clear
24elseif exists("b:current_syntax")
25  finish
26endif
27
28" ---- Special characters ---- "
29
30" no harm in just matching any \[char] within double quotes, right?
31syn match gnuplotSpecial	"\\." contained
32" syn match gnuplotSpecial	"\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[a-z\\]" contained
33
34" measurements in the units in, cm and pt are special
35syn match gnuplotUnit		"[0-9]+in"
36syn match gnuplotUnit		"[0-9]+cm"
37syn match gnuplotUnit		"[0-9]+pt"
38
39" external (shell) commands are special
40syn region gnuplotExternal	start="!" end="$"
41
42" ---- Comments ---- "
43
44syn region gnuplotComment	start="#" end="$" contains=gnuplotTodo
45
46" ---- Constants ---- "
47
48" strings
49syn region gnuplotString	start=+"+ skip=+\\"+ end=+"+ contains=gnuplotSpecial
50syn region gnuplotString	start="'" end="'"
51
52" built-in variables
53syn keyword gnuplotNumber	GNUTERM GPVAL_TERM GPVAL_TERMOPTIONS GPVAL_SPLOT
54syn keyword gnuplotNumber	GPVAL_OUTPUT GPVAL_ENCODING GPVAL_VERSION
55syn keyword gnuplotNumber	GPVAL_PATCHLEVEL GPVAL_COMPILE_OPTIONS
56syn keyword gnuplotNumber	GPVAL_MULTIPLOT GPVAL_PLOT GPVAL_VIEW_ZSCALE
57syn keyword gnuplotNumber	GPVAL_TERMINALS GPVAL_pi GPVAL_NaN
58syn keyword gnuplotNumber	GPVAL_ERRNO GPVAL_ERRMSG GPVAL_PWD
59syn keyword gnuplotNumber	pi NaN GPVAL_LAST_PLOT GPVAL_TERM_WINDOWID
60syn keyword gnuplotNumber	GPVAL_X_MIN GPVAL_X_MAX GPVAL_X_LOG
61syn keyword gnuplotNumber	GPVAL_DATA_X_MIN GPVAL_DATA_X_MAX GPVAL_Y_MIN
62syn keyword gnuplotNumber	GPVAL_Y_MAX GPVAL_Y_LOG GPVAL_DATA_Y_MIN
63syn keyword gnuplotNumber	GPVAL_DATA_Y_MAX GPVAL_X2_MIN GPVAL_X2_MAX
64syn keyword gnuplotNumber	GPVAL_X2_LOG GPVAL_DATA_X2_MIN GPVAL_DATA_X2_MAX
65syn keyword gnuplotNumber	GPVAL_Y2_MIN GPVAL_Y2_MAX GPVAL_Y2_LOG
66syn keyword gnuplotNumber	GPVAL_DATA_Y2_MIN GPVAL_DATA_Y2_MAX GPVAL_Z_MIN
67syn keyword gnuplotNumber	GPVAL_Z_MAX GPVAL_Z_LOG GPVAL_DATA_Z_MIN
68syn keyword gnuplotNumber	GPVAL_DATA_Z_MAX GPVAL_CB_MIN GPVAL_CB_MAX
69syn keyword gnuplotNumber	GPVAL_CB_LOG GPVAL_DATA_CB_MIN GPVAL_DATA_CB_MAX
70syn keyword gnuplotNumber	GPVAL_T_MIN GPVAL_T_MAX GPVAL_T_LOG GPVAL_U_MIN
71syn keyword gnuplotNumber	GPVAL_U_MAX GPVAL_U_LOG GPVAL_V_MIN GPVAL_V_MAX
72syn keyword gnuplotNumber	GPVAL_V_LOG GPVAL_R_MIN GPVAL_R_LOG
73syn keyword gnuplotNumber	GPVAL_TERM_XMIN GPVAL_TERM_XMAX GPVAL_TERM_YMIN
74syn keyword gnuplotNumber	GPVAL_TERM_YMAX GPVAL_TERM_XSIZE
75syn keyword gnuplotNumber	GPVAL_TERM_YSIZE GPVAL_VIEW_MAP GPVAL_VIEW_ROT_X
76syn keyword gnuplotNumber	GPVAL_VIEW_ROT_Z GPVAL_VIEW_SCALE
77
78" function name variables
79syn match gnuplotNumber		"GPFUN_[a-zA-Z_]*"
80
81" stats variables
82syn keyword gnuplotNumber	STATS_records STATS_outofrange STATS_invalid
83syn keyword gnuplotNumber	STATS_blank STATS_blocks STATS_columns STATS_min
84syn keyword gnuplotNumber	STATS_max STATS_index_min STATS_index_max
85syn keyword gnuplotNumber	STATS_lo_quartile STATS_median STATS_up_quartile
86syn keyword gnuplotNumber	STATS_mean STATS_stddev STATS_sum STATS_sumsq
87syn keyword gnuplotNumber	STATS_correlation STATS_slope STATS_intercept
88syn keyword gnuplotNumber	STATS_sumxy STATS_pos_min_y STATS_pos_max_y
89syn keyword gnuplotNumber	STATS_mean STATS_stddev STATS_mean_x STATS_sum_x
90syn keyword gnuplotNumber	STATS_stddev_x STATS_sumsq_x STATS_min_x
91syn keyword gnuplotNumber	STATS_max_x STATS_median_x STATS_lo_quartile_x
92syn keyword gnuplotNumber	STATS_up_quartile_x STATS_index_min_x
93syn keyword gnuplotNumber	STATS_index_max_x STATS_mean_y STATS_stddev_y
94syn keyword gnuplotNumber	STATS_sum_y STATS_sumsq_y STATS_min_y
95syn keyword gnuplotNumber	STATS_max_y STATS_median_y STATS_lo_quartile_y
96syn keyword gnuplotNumber	STATS_up_quartile_y STATS_index_min_y
97syn keyword gnuplotNumber	STATS_index_max_y STATS_correlation STATS_sumxy
98
99" deprecated fit variables
100syn keyword gnuplotError	FIT_LIMIT FIT_MAXITER FIT_START_LAMBDA
101syn keyword gnuplotError	FIT_LAMBDA_FACTOR FIT_LOG FIT_SCRIPT
102
103" numbers, from c.vim
104
105" integer number, or floating point number without a dot and with "f".
106syn case    ignore
107syn match   gnuplotNumber	"\<[0-9]\+\(u\=l\=\|lu\|f\)\>"
108
109" floating point number, with dot, optional exponent
110syn match   gnuplotFloat	"\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
111
112" floating point number, starting with a dot, optional exponent
113syn match   gnuplotFloat	"\.[0-9]\+\(e[-+]\=[0-9]\+\)\=[fl]\=\>"
114
115" floating point number, without dot, with exponent
116syn match   gnuplotFloat	"\<[0-9]\+e[-+]\=[0-9]\+[fl]\=\>"
117
118" hex number
119syn match   gnuplotNumber	"\<0x[0-9a-f]\+\(u\=l\=\|lu\)\>"
120syn case    match
121
122" flag an octal number with wrong digits by not highlighting
123syn match   gnuplotOctalError	"\<0[0-7]*[89]"
124
125" ---- Identifiers: Functions ---- "
126
127" numerical functions
128syn keyword gnuplotFunc		abs acos acosh airy arg asin asinh atan atan2
129syn keyword gnuplotFunc		atanh EllipticK EllipticE EllipticPi besj0 besj1
130syn keyword gnuplotFunc		besy0 besy1 ceil cos cosh erf erfc exp expint
131syn keyword gnuplotFunc		floor gamma ibeta inverf igamma imag invnorm int
132syn keyword gnuplotFunc		lambertw lgamma log log10 norm rand real sgn sin
133syn keyword gnuplotFunc		sin sinh sqrt tan tanh voigt
134
135" string functions
136syn keyword gnuplotFunc		gprintf sprintf strlen strstrt substr strftime
137syn keyword gnuplotFunc		strptime system word words
138
139" other functions
140syn keyword gnuplotFunc		column columnhead columnheader defined exists
141syn keyword gnuplotFunc		hsv2rgb stringcolumn timecolumn tm_hour tm_mday
142syn keyword gnuplotFunc		tm_min tm_mon tm_sec tm_wday tm_yday tm_year
143syn keyword gnuplotFunc		time valid value
144
145" ---- Statements ---- "
146
147" common (builtin) variable names
148syn keyword gnuplotKeyword	x y t u v z s
149
150" conditionals
151syn keyword gnuplotConditional	if else
152
153" repeats
154syn keyword gnuplotRepeat	do for while
155
156" operators
157syn match gnuplotOperator	"[-+*/^|&?:]"
158syn match gnuplotOperator	"\*\*"
159syn match gnuplotOperator	"&&"
160syn match gnuplotOperator	"||"
161
162" Keywords
163
164" keywords for 'fit' command
165syn keyword gnuplotKeyword	via z x:z x:z:s x:y:z:s
166syn keyword gnuplotKeyword	x:y:t:z:s x:y:t:u:z:s x:y:t:u:v:z:s
167
168" keywords for 'plot' command
169" 'axes' keyword
170syn keyword gnuplotKeyword	axes x1y1 x1y2 x2y1 x2y2
171" 'binary' keyword
172syn keyword gnuplotKeyword	binary matrix general array record format endian
173syn keyword gnuplotKeyword	filetype avs edf png scan transpose dx dy dz
174syn keyword gnuplotKeyword	flipx flipy flipz origin center rotate using
175syn keyword gnuplotKeyword	perpendicular skip every
176" datafile keywords
177syn keyword gnuplotKeyword	binary nonuniform matrix index every using
178syn keyword gnuplotKeyword	smooth volatile noautoscale every index
179" 'smooth' keywords
180syn keyword gnuplotKeyword	unique frequency cumulative cnormal kdensity
181syn keyword gnuplotKeyword	csplines acsplines bezer sbezier
182" deprecated 'thru' keyword
183syn keyword gnuplotError	thru
184" 'using' keyword
185syn keyword gnuplotKeyword	using u xticlabels yticlabels zticlabels
186syn keyword gnuplotKeyword	x2ticlabels y2ticlabels xtic ytic ztic
187" 'errorbars' keywords
188syn keyword gnuplotKeyword	errorbars xerrorbars yerrorbars xyerrorbars
189" 'errorlines' keywords
190syn keyword gnuplotKeyword	errorlines xerrorlines yerrorlines xyerrorlines
191" 'title' keywords
192syn keyword gnuplotKeyword	title t tit notitle columnheader at beginning
193syn keyword gnuplotKeyword	end
194" 'with' keywords
195syn keyword gnuplotKeyword	with w linestyle ls linetype lt linewidth
196syn keyword gnuplotKeyword	lw linecolor lc pointtype pt pointsize ps
197syn keyword gnuplotKeyword	fill fs nohidden3d nocontours nosurface palette
198" styles for 'with'
199syn keyword gnuplotKeyword	lines l points p linespoints lp surface dots
200syn keyword gnuplotKeyword	impulses labels vectors steps fsteps histeps
201syn keyword gnuplotKeyword	errorbars errorlines financebars xerrorbars
202syn keyword gnuplotKeyword	xerrorlines xyerrorbars yerrorbars yerrorlines
203syn keyword gnuplotKeyword	boxes boxerrorbars boxxyerrorbars boxplot
204syn keyword gnuplotKeyword	candlesticks circles ellipses filledcurves
205syn keyword gnuplotKeyword	histogram image rgbimage rgbalpha pm3d variable
206
207" keywords for 'save' command
208syn keyword gnuplotKeyword	save functions func variables all var terminal
209syn keyword gnuplotKeyword	term set
210
211" keywords for 'set/show' command
212" set angles
213syn keyword gnuplotKeyword	angles degrees deg radians rad
214" set arrow
215syn keyword gnuplotKeyword	arrow from to rto length angle arrowstyle as
216syn keyword gnuplotKeyword	nohead head backhead heads size filled empty
217syn keyword gnuplotKeyword	nofilled front back linestyle linetype linewidth
218" set autoscale
219" TODO regexp here
220syn keyword gnuplotKeyword	autoscale x y z cb x2 y2 zy min max fixmin
221syn keyword gnuplotKeyword	fixmax fix keepfix noextend
222" set bars
223syn keyword gnuplotKeyword	bars small large fullwidth front back
224" set bind
225syn keyword gnuplotKeyword	bind
226" set margins
227" TODO regexp
228syn keyword gnuplotKeyword	margin bmargin lmargin rmargin tmargin
229" set border
230syn keyword gnuplotKeyword	border front back
231" set boxwidth
232syn keyword gnuplotKeyword	boxwidth absolute relative
233" deprecated set clabel
234syn keyword gnuplotError	clabel
235" set clip
236syn keyword gnuplotKeyword	clip points one two
237" set cntrlabel
238syn keyword gnuplotKeyword	cntrlabel format font start interval onecolor
239" set cntrparam
240syn keyword gnuplotKeyword	cntrparam linear cubicspline bspline points
241syn keyword gnuplotKeyword	order levels auto discrete incremental
242" set colorbox
243syn keyword gnuplotKeyword	colorbox vertical horizontal default user origin
244syn keyword gnuplotKeyword	size front back noborder bdefault border
245" show colornames
246syn keyword gnuplotKeyword	colornames
247" set contour
248syn keyword gnuplotKeyword	contour base surface both
249" set datafile
250syn keyword gnuplotKeyword	datafile fortran nofpe_trap missing separator
251syn keyword gnuplotKeyword	whitespace tab comma commentschars binary
252" set decimalsign
253syn keyword gnuplotKeyword	decimalsign locale
254" set dgrid3d
255syn keyword gnuplotKeyword	dgrid3d splines qnorm gauss cauchy exp box hann
256syn keyword gnuplotKeyword	kdensity
257" set dummy
258syn keyword gnuplotKeyword	dummy
259" set encoding
260syn keyword gnuplotKeyword	encoding default iso_8859_1 iso_8859_15
261syn keyword gnuplotKeyword	iso_8859_2 iso_8859_9 koi8r koi8u cp437 cp850
262syn keyword gnuplotKeyword	cp852 cp950 cp1250 cp1251 cp1254 sjis utf8
263" set fit
264syn keyword gnuplotKeyword	fit logfile default quiet noquiet results brief
265syn keyword gnuplotKeyword	verbose errorvariables noerrorvariables
266syn keyword gnuplotKeyword	errorscaling noerrorscaling prescale noprescale
267syn keyword gnuplotKeyword	maxiter none limit limit_abs start-lambda script
268syn keyword gnuplotKeyword	lambda-factor
269" set fontpath
270syn keyword gnuplotKeyword	fontpath
271" set format
272syn keyword gnuplotKeyword	format
273" show functions
274syn keyword gnuplotKeyword	functions
275" set grid
276syn keyword gnuplotKeyword	grid polar layerdefault xtics ytics ztics x2tics
277syn keyword gnuplotKeyword	y2tics cbtics mxtics mytics mztics mx2tics
278syn keyword gnuplotKeyword	my2tics mcbtics xmtics ymtics zmtics x2mtics
279syn keyword gnuplotKeyword	y2mtics cbmtics noxtics noytics noztics nox2tics
280syn keyword gnuplotKeyword	noy2tics nocbtics nomxtics nomytics nomztics
281syn keyword gnuplotKeyword	nomx2tics nomy2tics nomcbtics
282" set hidden3d
283syn keyword gnuplotKeyword	hidden3d offset trianglepattern undefined
284syn keyword gnuplotKeyword	altdiagonal noaltdiagonal bentover nobentover
285syn keyword gnuplotKeyword	noundefined
286" set historysize
287syn keyword gnuplotKeyword	historysize
288" set isosamples
289syn keyword gnuplotKeyword	isosamples
290" set key
291syn keyword gnuplotKeyword	key on off inside outside at left right center
292syn keyword gnuplotKeyword	top bottom vertical horizontal Left Right
293syn keyword gnuplotKeyword	opaque noopaque reverse noreverse invert maxrows
294syn keyword gnuplotKeyword	noinvert samplen spacing width height autotitle
295syn keyword gnuplotKeyword	noautotitle title enhanced noenhanced font
296syn keyword gnuplotKeyword	textcolor box nobox linetype linewidth maxcols
297" set label
298syn keyword gnuplotKeyword	label left center right rotate norotate by font
299syn keyword gnuplotKeyword	front back textcolor point nopoint offset boxed
300syn keyword gnuplotKeyword	hypertext
301" set linetype
302syn keyword gnuplotKeyword	linetype
303" set link
304syn keyword gnuplotKeyword	link via inverse
305" set loadpath
306syn keyword gnuplotKeyword	loadpath
307" set locale
308syn keyword gnuplotKeyword	locale
309" set logscale
310syn keyword gnuplotKeyword	logscale log
311" set macros
312syn keyword gnuplotKeyword	macros
313" set mapping
314syn keyword gnuplotKeyword	mapping cartesian spherical cylindrical
315" set mouse
316syn keyword gnuplotKeyword	mouse doubleclick nodoubleclick zoomcoordinates
317syn keyword gnuplotKeyword	nozoomcoordinates ruler noruler at polardistance
318syn keyword gnuplotKeyword	nopolardistance deg tan format clipboardformat
319syn keyword gnuplotKeyword	mouseformat labels nolabels zoomjump nozoomjump
320syn keyword gnuplotKeyword	verbose noverbose
321" set multiplot
322syn keyword gnuplotKeyword	multiplot title font layout rowsfirst downwards
323syn keyword gnuplotKeyword	downwards upwards scale offset
324" set object
325syn keyword gnuplotKeyword	object behind fillcolor fc fs rectangle ellipse
326syn keyword gnuplotKeyword	circle polygon at center size units xy xx yy to
327syn keyword gnuplotKeyword	from
328" set offsets
329syn keyword gnuplotKeyword	offsets
330" set origin
331syn keyword gnuplotKeyword	origin
332" set output
333syn keyword gnuplotKeyword	output
334" set parametric
335syn keyword gnuplotKeyword	parametric
336" show plot
337syn keyword gnuplotKeyword	plot add2history
338" set pm3d
339syn keyword gnuplotKeyword	hidden3d interpolate scansautomatic scansforward
340syn keyword gnuplotKeyword	scansbackward depthorder flush begin center end
341syn keyword gnuplotKeyword	ftriangles noftriangles clip1in clip4in mean map
342syn keyword gnuplotKeyword	corners2color geomean harmean rms median min max
343syn keyword gnuplotKeyword	c1 c2 c3 c4 pm3d at nohidden3d implicit explicit
344" set palette
345syn keyword gnuplotKeyword	palette gray color gamma rgbformulae defined
346syn keyword gnuplotKeyword	file functions cubehelix start cycles saturation
347syn keyword gnuplotKeyword	model RGB HSV CMY YIQ XYZ positive negative
348syn keyword gnuplotKeyword	nops_allcF ps_allcF maxcolors float int gradient
349syn keyword gnuplotKeyword	fit2rgbformulae rgbformulae
350" set pointintervalbox
351syn keyword gnuplotKeyword	pointintervalbox
352" set pointsize
353syn keyword gnuplotKeyword	pointsize
354" set polar
355syn keyword gnuplotKeyword	polar
356" set print
357syn keyword gnuplotKeyword	print append
358" set psdir
359syn keyword gnuplotKeyword	psdir
360" set raxis
361syn keyword gnuplotKeyword	raxis rrange rtics
362" set samples
363syn keyword gnuplotKeyword	samples
364" set size
365syn keyword gnuplotKeyword	size square nosquare ratio noratio
366" set style
367syn keyword gnuplotKeyword	style function data noborder rectangle arrow
368syn keyword gnuplotKeyword	default nohead head heads size filled empty
369syn keyword gnuplotKeyword	nofilled front back boxplot range fraction
370syn keyword gnuplotKeyword	outliers nooutliers pointtype candlesticks
371syn keyword gnuplotKeyword	separation labels off auto x x2 sorted unsorted
372syn keyword gnuplotKeyword	fill empty transparent solid pattern border
373syn keyword gnuplotKeyword	increment userstyles financebars line default
374syn keyword gnuplotKeyword	linetype lt linecolor lc linewidth lw pointtype
375syn keyword gnuplotKeyword	pt pointsize ps pointinterval pi palette circle
376syn keyword gnuplotKeyword	radius graph screen wedge nowedge ellipse size
377syn keyword gnuplotKeyword	units xx xy yy histogram line textbox opaque
378syn keyword gnuplotKeyword	border noborder
379" set surface
380syn keyword gnuplotKeyword	surface implicit explicit
381" set table
382syn keyword gnuplotKeyword	table
383" set terminal (list of terminals)
384syn keyword gnuplotKeyword	terminal term push pop aed512 aed767 aifm aqua
385syn keyword gnuplotKeyword	be cairo cairolatex canvas cgm context corel
386syn keyword gnuplotKeyword	debug dumb dxf dxy800a eepic emf emxvga epscairo
387syn keyword gnuplotKeyword	epslatex epson_180dpi excl fig ggi gif gpic hpgl
388syn keyword gnuplotKeyword	grass hp2623a hp2648 hp500c hpljii hppj imagen
389syn keyword gnuplotKeyword	jpeg kyo latex linux lua mf mif mp next openstep
390syn keyword gnuplotKeyword	pbm pdf pdfcairo pm png pngcairo postscript
391syn keyword gnuplotKeyword	pslatex pstex pstricks qms qt regis sun svg svga
392syn keyword gnuplotKeyword	tek40 tek410x texdraw tgif tikz tkcanvas tpic
393syn keyword gnuplotKeyword	vgagl vws vx384 windows wx wxt x11 xlib
394" keywords for 'set terminal'
395syn keyword gnuplotKeyword	color monochrome dashlength dl eps pdf fontscale
396syn keyword gnuplotKeyword	standalone blacktext colortext colourtext header
397syn keyword gnuplotKeyword	noheader mono color solid dashed notransparent
398syn keyword gnuplotKeyword	crop crop background input rounded butt square
399syn keyword gnuplotKeyword	size fsize standalone name jsdir defaultsize
400syn keyword gnuplotKeyword	timestamp notimestamp colour mitered beveled
401syn keyword gnuplotKeyword	round squared palfuncparam blacktext nec_cp6
402syn keyword gnuplotKeyword	mppoints inlineimages externalimages defaultfont
403syn keyword gnuplotKeyword	aspect feed nofeed rotate small tiny standalone
404syn keyword gnuplotKeyword	oldstyle newstyle level1 leveldefault level3
405syn keyword gnuplotKeyword	background nobackground solid clip noclip
406syn keyword gnuplotKeyword	colortext colourtext epson_60dpi epson_lx800
407syn keyword gnuplotKeyword	okidata starc tandy_60dpi dpu414 nec_cp6 draft
408syn keyword gnuplotKeyword	medium large normal landscape portrait big
409syn keyword gnuplotKeyword	inches pointsmax textspecial texthidden
410syn keyword gnuplotKeyword	thickness depth version acceleration giant
411syn keyword gnuplotKeyword	delay loop optimize nooptimize pspoints
412syn keyword gnuplotKeyword	FNT9X17 FNT13X25 interlace nointerlace courier
413syn keyword gnuplotKeyword	originreset nooriginreset gparrows nogparrows
414syn keyword gnuplotKeyword	picenvironment nopicenvironment tightboundingbox
415syn keyword gnuplotKeyword	notightboundingbox charsize gppoints nogppoints
416syn keyword gnuplotKeyword	fontscale textscale fulldoc nofulldoc standalone
417syn keyword gnuplotKeyword	preamble header tikzplot tikzarrows notikzarrows
418syn keyword gnuplotKeyword	cmykimages externalimages noexternalimages
419syn keyword gnuplotKeyword	polyline vectors magnification psnfss nopsnfss
420syn keyword gnuplotKeyword	psnfss-version7 prologues a4paper amstex fname
421syn keyword gnuplotKeyword	fsize server persist widelines interlace
422syn keyword gnuplotKeyword	truecolor notruecolor defaultplex simplex duplex
423syn keyword gnuplotKeyword	nofontfiles adobeglyphnames noadobeglyphnames
424syn keyword gnuplotKeyword	nostandalone metric textrigid animate nopspoints
425syn keyword gnuplotKeyword	hpdj FNT5X9 roman emtex rgbimages bitmap
426syn keyword gnuplotKeyword	nobitmap providevars nointerlace add delete
427syn keyword gnuplotKeyword	auxfile hacktext unit raise palfuncparam
428syn keyword gnuplotKeyword	noauxfile nohacktext nounit noraise ctrl noctrl
429syn keyword gnuplotKeyword	close widget fixed dynamic tek40xx vttek
430syn keyword gnuplotKeyword	kc-tek40xx km-tek40xx bitgraph perltk
431syn keyword gnuplotKeyword	interactive red green blue interpolate mode
432syn keyword gnuplotKeyword	position ctrlq replotonresize position noctrlq
433syn keyword gnuplotKeyword	noreplotonresize
434" set termoption
435syn keyword gnuplotKeyword	termoption font fontscale solid dashed
436" set tics
437syn keyword gnuplotKeyword	tics add axis border mirror nomirror in out
438syn keyword gnuplotKeyword	scale rotate norotate by offset nooffset left
439syn keyword gnuplotKeyword	autojustify format font textcolor right center
440" deprecated set ticslevel
441syn keyword gnuplotError	ticslevel ticscale
442" set timestamp
443syn keyword gnuplotKeyword	timestamp top bottom offset font
444" set timefmt
445syn keyword gnuplotKeyword	timefmt
446" set title
447syn keyword gnuplotKeyword	title offset font textcolor tc
448" set ranges
449syn keyword gnuplotKeyword	trange urange vrange
450" show variables
451syn keyword gnuplotKeyword	variables
452" show version
453syn keyword gnuplotKeyword	version
454" set view
455syn keyword gnuplotKeyword	view map equal noequal xy xyz
456" set x2data
457syn keyword gnuplotKeyword	xdata ydata zdata x2data y2data cbdata xdtics
458syn keyword gnuplotKeyword	ydtics zdtics x2dtics y2dtics cbdtics xzeroaxis
459syn keyword gnuplotKeyword	yzeroaxis zzeroaxis x2zeroaxis y2zeroaxis
460syn keyword gnuplotKeyword	cbzeroaxis time geographic
461" set label
462syn keyword gnuplotKeyword	xlabel ylabel zlabel x2label y2label cblabel
463syn keyword gnuplotKeyword	offset font textcolor by parallel
464" set range
465syn keyword gnuplotKeyword	xrange yrange zrange x2range y2range cbrange
466" set xyplane
467syn keyword gnuplotKeyword	xyplane
468" set zeroaxis
469" set zero
470syn keyword gnuplotKeyword	zero
471" set zeroaxis
472syn keyword gnuplotKeyword	zeroaxis
473
474" keywords for 'stats' command
475syn keyword gnuplotKeyword	nooutput
476
477" keywords for 'test' command
478syn keyword gnuplotKeyword	terminal palette rgb rbg grb gbr brg bgr
479
480" ---- Macros ---- "
481
482syn region gnuplotMacro		start="@" end=" "
483
484" ---- Todos ---- "
485
486syn keyword gnuplotTodo		contained TODO FIXME XXX
487
488" ---- Types: gnuplot commands ---- "
489
490" I set the commands as Types to distinguish them visually from keywords for the
491" commands.  This comes at the end of the syntax file because some commands
492" are redundant with keywords.  It's probably too much trouble to go and
493" create special regions for each redundant keyword/command pair, which means
494" that some keywords (e.g. 'p') will be highlighted as commands.
495
496syn keyword gnuplotStatement	cd call clear evaluate exit fit help history
497syn keyword gnuplotStatement	load lower pause plot p print pwd quit raise
498syn keyword gnuplotStatement	refresh replot rep reread reset save set show
499syn keyword gnuplotStatement	shell splot spstats system test undefine unset
500syn keyword gnuplotStatement	update
501
502" ---- Define the default highlighting ---- "
503" For version 5.7 and earlier: only when not done already
504" For version 5.8 and later: only when an item doesn't have highlighting yet
505if version >= 508 || !exists("did_gnuplot_syntax_inits")
506  if version < 508
507    let did_gnuplot_syntax_inits = 1
508    command -nargs=+ HiLink hi link <args>
509  else
510    command -nargs=+ HiLink hi def link <args>
511  endif
512
513  " ---- Comments ---- "
514  HiLink gnuplotComment		Comment
515
516  " ---- Constants ---- "
517  HiLink gnuplotString		String
518  HiLink gnuplotNumber		Number
519  HiLink gnuplotFloat		Float
520
521  " ---- Identifiers ---- "
522  HiLink gnuplotIdentifier	Identifier
523
524  " ---- Statements ---- "
525  HiLink gnuplotConditional	Conditional
526  HiLink gnuplotRepeat		Repeat
527  HiLink gnuplotKeyword		Keyword
528  HiLink gnuplotOperator	Operator
529
530  " ---- PreProcs ---- "
531  HiLink gnuplotMacro		Macro
532
533  " ---- Types ---- "
534  HiLink gnuplotStatement	Type
535  HiLink gnuplotFunc		Identifier
536
537  " ---- Specials ---- "
538  HiLink gnuplotSpecial		Special
539  HiLink gnuplotUnit		Special
540  HiLink gnuplotExternal	Special
541
542  " ---- Errors ---- "
543  HiLink gnuplotError		Error
544  HiLink gnuplotOctalError	Error
545
546  " ---- Todos ---- "
547  HiLink gnuplotTodo		Todo
548
549  delcommand HiLink
550endif
551
552let b:current_syntax = "gnuplot"
553
554" vim: ts=8
555