gnuplot.vim 23 KB

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