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