robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
5a304b7864
master
1" Vim syntax file 2" Language: MetaPost 3" Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com> 4" Former Maintainers: Andreas Scherer <andreas.scherer@pobox.com> 5" Last Change: 2016 Oct 14 6 7if exists ( "b:current_syntax" ) 8finish 9endif 10 11let s: cpo_sav = & cpo 12set cpo & vim 13 14if exists ( "g:plain_mf_macros" ) 15let s: plain_mf_macros = g: plain_mf_macros 16endif 17if exists ( "g:plain_mf_modes" ) 18let s: plain_mf_modes = g: plain_mf_modes 19endif 20if exists ( "g:other_mf_macros" ) 21let s: other_mf_macros = g: other_mf_macros 22endif 23 24let g: plain_mf_macros = 0 " plain.mf has no special meaning for MetaPost 25let g: plain_mf_modes = 0 " No METAFONT modes 26let g: other_mf_macros = 0 " cmbase.mf, logo.mf, ... neither 27 28" Read the METAFONT syntax to start with 29runtime ! syntax/mf.vim 30unlet b: current_syntax " Necessary for syn include below 31 32" Restore the value of existing global variables 33if exists ( "s:plain_mf_macros" ) 34let g: plain_mf_macros = s: plain_mf_macros 35else 36unlet g: plain_mf_macros 37endif 38if exists ( "s:plain_mf_modes" ) 39let g: plain_mf_modes = s: plain_mf_modes 40else 41unlet g: plain_mf_modes 42endif 43if exists ( "s:other_mf_macros" ) 44let g: other_mf_macros = s: other_mf_macros 45else 46unlet g: other_mf_macros 47endif 48 49" Use TeX highlighting inside verbatimtex/btex... etex 50syn include @MPTeX syntax/tex.vim 51unlet b: current_syntax 52" These are defined as keywords rather than using matchgroup 53" in order to make them available to syntaxcomplete. 54syn keyword mpTeXdelim btex etex verbatimtex contained 55syn region mpTeXinsert 56 \start = /\<verbatimtex\>\|\<btex\> /rs= e+1 57 \end = /\<etex\> /re= s-1keepend 58 \contains = @MPTeX , mpTeXdelim 59 60" iskeyword must be set after the syn include above, because tex.vim sets `syn 61" iskeyword`. Note that keywords do not contain numbers (numbers are 62" subscripts) 63syntax iskeyword @,_ 64 65" MetaPost primitives not found in METAFONT 66syn keyword mpBoolExp bounded clipped filled stroked textual arclength 67syn keyword mpNumExp arctime blackpart bluepart colormodel cyanpart 68syn keyword mpNumExp fontsize greenpart greypart magentapart redpart 69syn keyword mpPairExp yellowpart llcorner lrcorner ulcorner urcorner 70" envelope is seemingly undocumented, but it exists since mpost 1.003. 71" The syntax is: envelope <polygonal pen> of <path primary>. For example, 72" path p; 73" p := envelope pensquare of (up--left); 74" (Thanks to Daniel H. Luecking for the example!) 75syn keyword mpPathExp envelope pathpart 76syn keyword mpPenExp penpart 77syn keyword mpPicExp dashpart glyph infont 78syn keyword mpStringExp fontpart readfrom textpart 79syn keyword mpType cmykcolor color rgbcolor 80" Other MetaPost primitives listed in the manual 81syn keyword mpPrimitive mpxbreak within 82" Internal quantities not found in METAFONT 83" (Table 6 in MetaPost: A User's Manual) 84syn keyword mpInternal defaultcolormodel hour minute linecap linejoin 85syn keyword mpInternal miterlimit mpprocset mpversion numberprecision 86syn keyword mpInternal numbersystem outputfilename outputformat 87syn keyword mpInternal outputformatoptions outputtemplate prologues 88syn keyword mpInternal restoreclipcolor tracinglostchars troffmode 89syn keyword mpInternal truecorners 90" List of commands not found in METAFONT (from MetaPost: A User's Manual) 91syn keyword mpCommand clip closefrom dashed filenametemplate fontmapfile 92syn keyword mpCommand fontmapline setbounds withcmykcolor withcolor 93syn keyword mpCommand withgreyscale withoutcolor withpostscript 94syn keyword mpCommand withprescript withrgbcolor write 95" METAFONT internal variables not found in MetaPost 96syn keyword notDefined autorounding chardx chardy fillin granularity 97syn keyword notDefined proofing smoothing tracingedges tracingpens 98syn keyword notDefined turningcheck xoffset yoffset 99" Suffix defined only in METAFONT: 100syn keyword notDefined nodot 101" Other not implemented primitives (see MetaPost: A User's Manual, §C.1) 102syn keyword notDefined cull display openwindow numspecial totalweight 103syn keyword notDefined withweight 104 105" Keywords defined by plain.mp 106if get ( g:, "plain_mp_macros" , 1 ) || get ( g:, "mp_metafun_macros" , 0 ) 107syn keyword mpDef beginfig clear_pen_memory clearit clearpen clearpen 108syn keyword mpDef clearxy colorpart cutdraw downto draw drawarrow 109syn keyword mpDef drawdblarrow drawdot drawoptions endfig erase 110syn keyword mpDef exitunless fill filldraw flex gobble hide interact 111syn keyword mpDef label loggingall makelabel numtok penstroke pickup 112syn keyword mpDef range reflectedabout rotatedaround shipit 113syn keyword mpDef stop superellipse takepower tracingall tracingnone 114syn keyword mpDef undraw undrawdot unfill unfilldraw upto 115syn match mpDef "??? " 116syn keyword mpVardef arrowhead bbox bot buildcycle byte ceiling center 117syn keyword mpVardef counterclockwise decr dir direction directionpoint 118syn keyword mpVardef dotlabel dotlabels image incr interpath inverse 119syn keyword mpVardef labels lft magstep max min penlabels penpos round 120syn keyword mpVardef rt savepen solve tensepath thelabel top unitvector 121syn keyword mpVardef whatever z 122syn keyword mpPrimaryDef div dotprod gobbled mod 123syn keyword mpSecondaryDef intersectionpoint 124syn keyword mpTertiaryDef cutafter cutbefore softjoin thru 125syn keyword mpNewInternal ahangle ahlength bboxmargin beveled butt defaultpen 126syn keyword mpNewInternal defaultscale dotlabeldiam eps epsilon infinity 127syn keyword mpNewInternal join_radius labeloffset mitered pen_bot pen_lft 128syn keyword mpNewInternal pen_rt pen_top rounded squared tolerance 129" Predefined constants 130syn keyword mpConstant EOF background base_name base_version black 131syn keyword mpConstant blankpicture blue ditto down evenly fullcircle 132syn keyword mpConstant green halfcircle identity left origin penrazor 133syn keyword mpConstant penspeck pensquare quartercircle red right 134syn keyword mpConstant unitsquare up white withdots 135" Other predefined variables 136syn keyword mpVariable currentpen currentpen_path currentpicture cuttings 137syn keyword mpVariable defaultfont extra_beginfig extra_endfig 138syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\> / 139syn match mpVariable /\<\%(laboff\|labxf\|labyf\)\.\%(lft\|rt\|bot\|top\|ulft\|urt\|llft\|lrt\)\> / 140" let statements: 141syn keyword mpnumExp abs 142syn keyword mpDef rotatedabout 143syn keyword mpCommand bye relax 144" on and off are not technically keywords, but it is nice to highlight them 145" inside dashpattern(). 146syn keyword mpOnOff off on contained 147syn keyword mpDash dashpattern contained 148syn region mpDashPattern 149 \start = "dashpattern\s * " 150 \end = ") "he= e-1 151 \contains = mfNumeric , mfLength , mpOnOff , mpDash 152endif 153 154" Keywords defined by mfplain.mp 155if get ( g:, "mfplain_mp_macros" , 0 ) 156syn keyword mpDef beginchar capsule_def change_width 157syn keyword mpDef define_blacker_pixels define_corrected_pixels 158syn keyword mpDef define_good_x_pixels define_good_y_pixels 159syn keyword mpDef define_horizontal_corrected_pixels define_pixels 160syn keyword mpDef define_whole_blacker_pixels define_whole_pixels 161syn keyword mpDef define_whole_vertical_blacker_pixels 162syn keyword mpDef define_whole_vertical_pixels endchar 163syn keyword mpDef font_coding_scheme font_extra_space font_identifier 164syn keyword mpDef font_normal_shrink font_normal_space 165syn keyword mpDef font_normal_stretch font_quad font_size font_slant 166syn keyword mpDef font_x_height italcorr labelfont lowres_fix makebox 167syn keyword mpDef makegrid maketicks mode_def mode_setup proofrule 168syn keyword mpDef smode 169syn keyword mpVardef hround proofrulethickness vround 170syn keyword mpNewInternal blacker o_correction 171syn keyword mpVariable extra_beginchar extra_endchar extra_setup rulepen 172" plus some no-ops, also from mfplain.mp 173syn keyword mpDef cull cullit gfcorners imagerules nodisplays 174syn keyword mpDef notransforms openit proofoffset screenchars 175syn keyword mpDef screenrule screenstrokes showit 176syn keyword mpVardef grayfont slantfont titlefont 177syn keyword mpVariable currenttransform 178syn keyword mpConstant unitpixel 179" These are not listed in the MetaPost manual, and some are ignored by 180" MetaPost, but are nonetheless defined in mfplain.mp 181syn keyword mpDef killtext 182syn match mpVardef "\<good\.\%(x\|y\|lft\|rt\|top\|bot\)\> " 183syn keyword mpVariable aspect_ratio localfont mag mode mode_name 184syn keyword mpVariable proofcolor 185syn keyword mpConstant lowres proof smoke 186syn keyword mpNewInternal autorounding bp_per_pixel granularity 187syn keyword mpNewInternal number_of_modes proofing smoothing turningcheck 188endif 189 190" Keywords defined by all base macro packages: 191" - (r)boxes.mp 192" - format.mp 193" - graph.mp 194" - marith.mp 195" - sarith.mp 196" - string.mp 197" - TEX.mp 198if get ( g:, "other_mp_macros" , 1 ) 199" boxes and rboxes 200syn keyword mpDef boxjoin drawboxed drawboxes drawunboxed 201syn keyword mpNewInternal circmargin defaultdx defaultdy rbox_radius 202syn keyword mpVardef boxit bpath circleit fixpos fixsize generic_declare 203syn keyword mpVardef generic_redeclare generisize pic rboxit str_prefix 204" format 205syn keyword mpVardef Mformat format init_numbers roundd 206syn keyword mpVariable Fe_base Fe_plus 207syn keyword mpConstant Ten_to 208" graph 209syn keyword mpDef Gfor Gxyscale OUT auto begingraph endgraph gdata 210syn keyword mpDef gdraw gdrawarrow gdrawdblarrow gfill plot 211syn keyword mpVardef augment autogrid frame gdotlabel glabel grid itick 212syn keyword mpVardef otick 213syn keyword mpVardef Mreadpath setcoords setrange 214syn keyword mpNewInternal Gmarks Gminlog Gpaths linear log 215syn keyword mpVariable Autoform Gemarks Glmarks Gumarks 216syn keyword mpConstant Gtemplate 217syn match mpVariable /Gmargin\.\%(low\|high\) / 218" marith 219syn keyword mpVardef Mabs Meform Mexp Mexp_str Mlog Mlog_Str Mlog_str 220syn keyword mpPrimaryDef Mdiv Mmul 221syn keyword mpSecondaryDef Madd Msub 222syn keyword mpTertiaryDef Mleq 223syn keyword mpNewInternal Mten Mzero 224" sarith 225syn keyword mpVardef Sabs Scvnum 226syn keyword mpPrimaryDef Sdiv Smul 227syn keyword mpSecondaryDef Sadd Ssub 228syn keyword mpTertiaryDef Sleq Sneq 229" string 230syn keyword mpVardef cspan isdigit loptok 231" TEX 232syn keyword mpVardef TEX TEXPOST TEXPRE 233endif 234 235" Up to date as of 23-Sep-2016. 236if get ( b:, 'mp_metafun_macros' , get ( g:, 'mp_metafun_macros' , 0 )) 237" Highlight TeX keywords (for use in ConTeXt documents) 238syn match mpTeXKeyword '\\ [ a-zA-Z@ ] \+ ' 239 240" These keywords have been added manually. 241syn keyword mpPrimitive runscript 242 243" The following MetaFun keywords have been extracted automatically from 244" ConTeXt source code. They include all "public" macros (where a macro is 245" considered public if and only if it does not start with _, mfun_, mlib_, or 246" do_, and it does not end with _), all "public" unsaved variables, and all 247" `let` statements. 248 249" mp-abck.mpiv 250syn keyword mpDef abck_grid_line anchor_box box_found boxfilloptions 251syn keyword mpDef boxgridoptions boxlineoptions draw_multi_pars 252syn keyword mpDef draw_multi_side draw_multi_side_path freeze_box 253syn keyword mpDef initialize_box initialize_box_pos 254syn keyword mpDef multi_side_draw_options show_multi_kind 255syn keyword mpDef show_multi_pars 256syn keyword mpVardef abck_baseline_grid abck_draw_path abck_graphic_grid 257syn keyword mpVariable boxdashtype boxfilloffset boxfilltype 258syn keyword mpVariable boxgriddirection boxgriddistance boxgridshift 259syn keyword mpVariable boxgridtype boxgridwidth boxlineoffset 260syn keyword mpVariable boxlineradius boxlinetype boxlinewidth multikind 261syn keyword mpConstant context_abck 262" mp-apos.mpiv 263syn keyword mpDef anch_sidebars_draw boxfilloptions boxlineoptions 264syn keyword mpDef connect_positions 265syn keyword mpConstant context_apos 266" mp-asnc.mpiv 267syn keyword mpDef FlushSyncTasks ProcessSyncTask ResetSyncTasks 268syn keyword mpDef SetSyncColor SetSyncThreshold SyncTask 269syn keyword mpVardef PrepareSyncTasks SyncBox TheSyncColor 270syn keyword mpVardef TheSyncThreshold 271syn keyword mpVariable CurrentSyncClass NOfSyncPaths SyncColor 272syn keyword mpVariable SyncLeftOffset SyncPaths SyncTasks SyncThreshold 273syn keyword mpVariable SyncThresholdMethod SyncWidth 274syn keyword mpConstant context_asnc 275" mp-back.mpiv 276syn keyword mpDef some_double_back some_hash 277syn keyword mpVariable back_nillcolor 278syn keyword mpConstant context_back 279" mp-bare.mpiv 280syn keyword mpVardef colordecimals rawtextext 281syn keyword mpPrimaryDef infont 282syn keyword mpConstant context_bare 283" mp-base.mpiv 284" This is essentially plain.mp with only a few keywords added 285syn keyword mpNumExp graypart 286syn keyword mpType graycolor greycolor 287syn keyword mpConstant cyan magenta yellow 288" mp-butt.mpiv 289syn keyword mpDef predefinedbutton some_button 290syn keyword mpConstant context_butt 291" mp-char.mpiv 292syn keyword mpDef flow_begin_chart flow_begin_sub_chart 293syn keyword mpDef flow_chart_draw_comment flow_chart_draw_exit 294syn keyword mpDef flow_chart_draw_label flow_chart_draw_text 295syn keyword mpDef flow_clip_chart flow_collapse_points 296syn keyword mpDef flow_connect_bottom_bottom flow_connect_bottom_left 297syn keyword mpDef flow_connect_bottom_right flow_connect_bottom_top 298syn keyword mpDef flow_connect_left_bottom flow_connect_left_left 299syn keyword mpDef flow_connect_left_right flow_connect_left_top 300syn keyword mpDef flow_connect_right_bottom flow_connect_right_left 301syn keyword mpDef flow_connect_right_right flow_connect_right_top 302syn keyword mpDef flow_connect_top_bottom flow_connect_top_left 303syn keyword mpDef flow_connect_top_right flow_connect_top_top 304syn keyword mpDef flow_draw_connection flow_draw_connection_point 305syn keyword mpDef flow_draw_midpoint flow_draw_shape 306syn keyword mpDef flow_draw_test_area flow_draw_test_shape 307syn keyword mpDef flow_draw_test_shapes flow_end_chart 308syn keyword mpDef flow_end_sub_chart flow_flush_connections 309syn keyword mpDef flow_flush_picture flow_flush_pictures 310syn keyword mpDef flow_flush_shape flow_flush_shapes 311syn keyword mpDef flow_initialize_grid flow_new_chart flow_new_shape 312syn keyword mpDef flow_scaled_to_grid flow_show_connection 313syn keyword mpDef flow_show_connections flow_show_shapes 314syn keyword mpDef flow_xy_offset flow_y_pos 315syn keyword mpVardef flow_connection_path flow_down_on_grid 316syn keyword mpVardef flow_down_to_grid flow_i_point flow_left_on_grid 317syn keyword mpVardef flow_left_to_grid flow_offset 318syn keyword mpVardef flow_points_initialized flow_right_on_grid 319syn keyword mpVardef flow_right_to_grid flow_smooth_connection 320syn keyword mpVardef flow_trim_points flow_trimmed flow_up_on_grid 321syn keyword mpVardef flow_up_to_grid flow_valid_connection 322syn keyword mpVardef flow_x_on_grid flow_xy_bottom flow_xy_left 323syn keyword mpVardef flow_xy_on_grid flow_xy_right flow_xy_top 324syn keyword mpVardef flow_y_on_grid 325syn keyword mpVariable flow_arrowtip flow_chart_background_color 326syn keyword mpVariable flow_chart_offset flow_comment_offset 327syn keyword mpVariable flow_connection_arrow_size 328syn keyword mpVariable flow_connection_dash_size 329syn keyword mpVariable flow_connection_line_color 330syn keyword mpVariable flow_connection_line_width 331syn keyword mpVariable flow_connection_smooth_size flow_connections 332syn keyword mpVariable flow_cpath flow_dash_pattern flow_dashline 333syn keyword mpVariable flow_exit_offset flow_forcevalid flow_grid_height 334syn keyword mpVariable flow_grid_width flow_label_offset flow_max_x 335syn keyword mpVariable flow_max_y flow_peepshape flow_reverse_connection 336syn keyword mpVariable flow_reverse_y flow_shape_action flow_shape_archive 337syn keyword mpVariable flow_shape_decision flow_shape_down 338syn keyword mpVariable flow_shape_fill_color flow_shape_height 339syn keyword mpVariable flow_shape_left flow_shape_line_color 340syn keyword mpVariable flow_shape_line_width flow_shape_loop 341syn keyword mpVariable flow_shape_multidocument flow_shape_node 342syn keyword mpVariable flow_shape_procedure flow_shape_product 343syn keyword mpVariable flow_shape_right flow_shape_singledocument 344syn keyword mpVariable flow_shape_subprocedure flow_shape_up 345syn keyword mpVariable flow_shape_wait flow_shape_width 346syn keyword mpVariable flow_show_all_points flow_show_con_points 347syn keyword mpVariable flow_show_mid_points flow_showcrossing flow_smooth 348syn keyword mpVariable flow_touchshape flow_xypoint flow_zfactor 349syn keyword mpConstant context_flow 350" mp-chem.mpiv 351syn keyword mpDef chem_init_all chem_reset chem_start_structure 352syn keyword mpDef chem_transformed 353syn keyword mpVardef chem_ad chem_adj chem_align chem_arrow chem_au 354syn keyword mpVardef chem_b chem_bb chem_bd chem_bw chem_c chem_cc 355syn keyword mpVardef chem_ccd chem_cd chem_crz chem_cz chem_dash chem_db 356syn keyword mpVardef chem_diff chem_dir chem_do chem_dr chem_draw 357syn keyword mpVardef chem_drawarrow chem_eb chem_ed chem_ep chem_er 358syn keyword mpVardef chem_es chem_et chem_fill chem_hb chem_init_some 359syn keyword mpVardef chem_label chem_ldb chem_ldd chem_line chem_lr 360syn keyword mpVardef chem_lrb chem_lrbd chem_lrd chem_lrh chem_lrn 361syn keyword mpVardef chem_lrt chem_lrz chem_lsr chem_lsub chem_mark 362syn keyword mpVardef chem_marked chem_mid chem_mids chem_midz chem_mir 363syn keyword mpVardef chem_mov chem_move chem_number chem_oe chem_off 364syn keyword mpVardef chem_pb chem_pe chem_r chem_r_fragment chem_rb 365syn keyword mpVardef chem_rbd chem_rd chem_rdb chem_rdd chem_restore 366syn keyword mpVardef chem_rh chem_rm chem_rn chem_rot chem_rr chem_rrb 367syn keyword mpVardef chem_rrbd chem_rrd chem_rrh chem_rrn chem_rrt 368syn keyword mpVardef chem_rrz chem_rsr chem_rsub chem_rt chem_rz chem_s 369syn keyword mpVardef chem_save chem_sb chem_sd chem_set chem_sr chem_ss 370syn keyword mpVardef chem_start_component chem_stop_component 371syn keyword mpVardef chem_stop_structure chem_sub chem_symbol chem_tb 372syn keyword mpVardef chem_text chem_z chem_zln chem_zlt chem_zn chem_zrn 373syn keyword mpVardef chem_zrt chem_zt 374syn keyword mpVariable chem_mark_pair chem_stack_mirror chem_stack_origin 375syn keyword mpVariable chem_stack_p chem_stack_previous 376syn keyword mpVariable chem_stack_rotation chem_trace_boundingbox 377syn keyword mpVariable chem_trace_nesting chem_trace_text 378syn keyword mpConstant context_chem 379" mp-core.mpiv 380syn keyword mpDef FlushSyncTasks ProcessSyncTask 381syn keyword mpDef RegisterLocalTextArea RegisterPlainTextArea 382syn keyword mpDef RegisterRegionTextArea RegisterTextArea 383syn keyword mpDef ResetLocalTextArea ResetSyncTasks ResetTextAreas 384syn keyword mpDef SaveTextAreas SetSyncColor SetSyncThreshold 385syn keyword mpDef SyncTask anchor_box box_found boxfilloptions 386syn keyword mpDef boxgridoptions boxlineoptions collapse_multi_pars 387syn keyword mpDef draw_box draw_multi_pars draw_par freeze_box 388syn keyword mpDef initialize_area initialize_area_par initialize_box 389syn keyword mpDef initialize_box_pos initialize_par 390syn keyword mpDef prepare_multi_pars relocate_multipars save_multipar 391syn keyword mpDef set_par_line_height show_multi_pars show_par 392syn keyword mpDef simplify_multi_pars sort_multi_pars 393syn keyword mpVardef InsideSavedTextArea InsideSomeSavedTextArea 394syn keyword mpVardef InsideSomeTextArea InsideTextArea PrepareSyncTasks 395syn keyword mpVardef SyncBox TextAreaH TextAreaW TextAreaWH TextAreaX 396syn keyword mpVardef TextAreaXY TextAreaY TheSyncColor TheSyncThreshold 397syn keyword mpVardef baseline_grid graphic_grid multi_par_at_top 398syn keyword mpVariable CurrentSyncClass NOfSavedTextAreas 399syn keyword mpVariable NOfSavedTextColumns NOfSyncPaths NOfTextAreas 400syn keyword mpVariable NOfTextColumns PlainTextArea RegionTextArea 401syn keyword mpVariable SavedTextColumns SyncColor SyncLeftOffset SyncPaths 402syn keyword mpVariable SyncTasks SyncThreshold SyncThresholdMethod 403syn keyword mpVariable SyncWidth TextAreas TextColumns 404syn keyword mpVariable auto_multi_par_hsize boxdashtype boxfilloffset 405syn keyword mpVariable boxfilltype boxgriddirection boxgriddistance 406syn keyword mpVariable boxgridshift boxgridtype boxgridwidth boxlineradius 407syn keyword mpVariable boxlinetype boxlinewidth check_multi_par_chain 408syn keyword mpVariable compensate_multi_par_topskip 409syn keyword mpVariable enable_multi_par_fallback force_multi_par_chain 410syn keyword mpVariable ignore_multi_par_page last_multi_par_shift lefthang 411syn keyword mpVariable local_multi_par_area multi_column_first_page_hack 412syn keyword mpVariable multi_par_pages multiloc multilocs multipar 413syn keyword mpVariable multipars multiref multirefs nofmultipars 414syn keyword mpVariable obey_multi_par_hang obey_multi_par_more 415syn keyword mpVariable one_piece_multi_par par_hang_after par_hang_indent 416syn keyword mpVariable par_indent par_left_skip par_line_height 417syn keyword mpVariable par_right_skip par_start_pos par_stop_pos 418syn keyword mpVariable par_strut_depth par_strut_height ppos righthang 419syn keyword mpVariable snap_multi_par_tops somehang span_multi_column_pars 420syn keyword mpVariable use_multi_par_region 421syn keyword mpConstant context_core 422syn keyword LET anchor_area anchor_par draw_area 423" mp-cows.mpiv 424syn keyword mpConstant context_cows cow 425" mp-crop.mpiv 426syn keyword mpDef page_marks_add_color page_marks_add_lines 427syn keyword mpDef page_marks_add_marking page_marks_add_number 428syn keyword mpVardef crop_color crop_gray crop_marks_cmyk 429syn keyword mpVardef crop_marks_cmykrgb crop_marks_gray crop_marks_lines 430syn keyword mpVariable crop_colors more page 431syn keyword mpConstant context_crop 432" mp-figs.mpiv 433syn keyword mpDef naturalfigure registerfigure 434syn keyword mpVardef figuredimensions figureheight figuresize 435syn keyword mpVardef figurewidth 436syn keyword mpConstant context_figs 437" mp-fobg.mpiv 438syn keyword mpDef DrawFoFrame 439syn keyword mpVardef equalpaths 440syn keyword mpPrimaryDef inset outset 441syn keyword mpVariable FoBackground FoBackgroundColor FoFrame FoLineColor 442syn keyword mpVariable FoLineStyle FoLineWidth FoSplit 443syn keyword mpConstant FoAll FoBottom FoDash FoDotted FoDouble FoGroove 444syn keyword mpConstant FoHidden FoInset FoLeft FoMedium FoNoColor FoNone 445syn keyword mpConstant FoOutset FoRidge FoRight FoSolid FoThick FoThin 446syn keyword mpConstant FoTop context_fobg 447" mp-form.mpiv 448syn keyword mpConstant context_form 449" mp-func.mpiv 450syn keyword mpDef constructedfunction constructedpairs 451syn keyword mpDef constructedpath curvedfunction curvedpairs 452syn keyword mpDef curvedpath function pathconnectors straightfunction 453syn keyword mpDef straightpairs straightpath 454syn keyword mpConstant context_func 455" mp-grap.mpiv 456syn keyword mpDef Gfor OUT auto begingraph circles crosses diamonds 457syn keyword mpDef downtriangles endgraph gdata gdraw gdrawarrow 458syn keyword mpDef gdrawdblarrow gfill graph_addto 459syn keyword mpDef graph_addto_currentpicture graph_comma 460syn keyword mpDef graph_coordinate_multiplication graph_draw 461syn keyword mpDef graph_draw_label graph_errorbar_text graph_fill 462syn keyword mpDef graph_generate_exponents 463syn keyword mpDef graph_generate_label_position 464syn keyword mpDef graph_generate_numbers graph_label_location 465syn keyword mpDef graph_scan_mark graph_scan_marks graph_setbounds 466syn keyword mpDef graph_suffix graph_tick_label 467syn keyword mpDef graph_with_pen_and_color graph_withlist 468syn keyword mpDef graph_xyscale lefttriangles makefunctionpath plot 469syn keyword mpDef plotsymbol points rainbow righttriangles smoothpath 470syn keyword mpDef squares stars uptriangles witherrorbars 471syn keyword mpVardef addtopath augment autogrid constant_fit 472syn keyword mpVardef constant_function det escaped_format exp 473syn keyword mpVardef exponential_fit exponential_function format 474syn keyword mpVardef formatted frame functionpath gaussian_fit 475syn keyword mpVardef gaussian_function gdotlabel glabel graph_Feform 476syn keyword mpVardef graph_Meform graph_arrowhead_extent graph_bounds 477syn keyword mpVardef graph_clear_bounds 478syn keyword mpVardef graph_convert_user_path_to_internal graph_cspan 479syn keyword mpVardef graph_draw_arrowhead graph_error graph_errorbars 480syn keyword mpVardef graph_exp graph_factor_and_exponent_to_string 481syn keyword mpVardef graph_gridline_picture graph_is_null 482syn keyword mpVardef graph_label_convert_user_to_internal graph_loptok 483syn keyword mpVardef graph_match_exponents graph_mlog 484syn keyword mpVardef graph_modified_exponent_ypart graph_pair_adjust 485syn keyword mpVardef graph_picture_conversion graph_post_draw 486syn keyword mpVardef graph_read_line graph_readpath graph_remap 487syn keyword mpVardef graph_scan_path graph_select_exponent_mark 488syn keyword mpVardef graph_select_mark graph_set_bounds 489syn keyword mpVardef graph_set_default_bounds graph_shapesize 490syn keyword mpVardef graph_stash_label graph_tick_mark_spacing 491syn keyword mpVardef graph_unknown_pair_bbox grid isdigit itick 492syn keyword mpVardef linear_fit linear_function ln logten lorentzian_fit 493syn keyword mpVardef lorentzian_function otick polynomial_fit 494syn keyword mpVardef polynomial_function power_law_fit 495syn keyword mpVardef power_law_function powten setcoords setrange 496syn keyword mpVardef sortpath strfmt tick varfmt 497syn keyword mpNewInternal Mzero doubleinfinity graph_log_minimum 498syn keyword mpNewInternal graph_minimum_number_of_marks largestmantissa 499syn keyword mpNewInternal linear lntwo log mlogten singleinfinity 500syn keyword mpVariable Autoform determinant fit_chi_squared 501syn keyword mpVariable graph_errorbar_picture graph_exp_marks 502syn keyword mpVariable graph_frame_pair_a graph_frame_pair_b 503syn keyword mpVariable graph_lin_marks graph_log_marks graph_modified_bias 504syn keyword mpVariable graph_modified_higher graph_modified_lower 505syn keyword mpVariable graph_shape r_s resistance_color resistance_name 506syn keyword mpConstant context_grap 507" mp-grid.mpiv 508syn keyword mpDef hlingrid hloggrid vlingrid vloggrid 509syn keyword mpVardef hlinlabel hlintext hlogtext linlin linlinpath 510syn keyword mpVardef linlog linlogpath loglin loglinpath loglog 511syn keyword mpVardef loglogpath processpath vlinlabel vlintext vlogtext 512syn keyword mpVariable fmt_initialize fmt_pictures fmt_precision 513syn keyword mpVariable fmt_separator fmt_zerocheck grid_eps 514syn keyword mpConstant context_grid 515" mp-grph.mpiv 516syn keyword mpDef beginfig begingraphictextfig data_mpo_file 517syn keyword mpDef data_mpy_file doloadfigure draw endfig 518syn keyword mpDef endgraphictextfig fill fixedplace graphictext 519syn keyword mpDef loadfigure new_graphictext normalwithshade number 520syn keyword mpDef old_graphictext outlinefill protectgraphicmacros 521syn keyword mpDef resetfig reversefill withdrawcolor withfillcolor 522syn keyword mpDef withshade 523syn keyword mpVariable currentgraphictext figureshift 524syn keyword mpConstant context_grph 525" mp-idea.mpiv 526syn keyword mpVardef bcomponent ccomponent gcomponent mcomponent 527syn keyword mpVardef rcomponent somecolor ycomponent 528" mp-luas.mpiv 529syn keyword mpDef luacall message 530syn keyword mpVardef MP lua lualist 531syn keyword mpConstant context_luas 532" mp-mlib.mpiv 533syn keyword mpDef autoalign bitmapimage circular_shade cmyk comment 534syn keyword mpDef defineshade eofill eofillup externalfigure figure 535syn keyword mpDef fillup label linear_shade multitonecolor namedcolor 536syn keyword mpDef nofill onlayer passarrayvariable passvariable 537syn keyword mpDef plain_label register resolvedcolor scantokens 538syn keyword mpDef set_circular_vector set_linear_vector shaded 539syn keyword mpDef spotcolor startpassingvariable stoppassingvariable 540syn keyword mpDef thelabel transparent[] usemetafunlabels 541syn keyword mpDef useplainlabels withcircularshade withlinearshade 542syn keyword mpDef withmask withproperties withshadecenter 543syn keyword mpDef withshadecolors withshadedirection withshadedomain 544syn keyword mpDef withshadefactor withshadefraction withshadeorigin 545syn keyword mpDef withshaderadius withshadestep withshadetransform 546syn keyword mpDef withshadevector withtransparency 547syn keyword mpVardef anchored checkbounds checkedbounds 548syn keyword mpVardef define_circular_shade define_linear_shade dotlabel 549syn keyword mpVardef escaped_format fmttext fontsize format formatted 550syn keyword mpVardef installlabel onetimefmttext onetimetextext 551syn keyword mpVardef outlinetext plain_thelabel properties rawfmttext 552syn keyword mpVardef rawtexbox rawtextext rule strfmt strut texbox 553syn keyword mpVardef textext thefmttext thelabel thetexbox thetextext 554syn keyword mpVardef tostring transparency_alternative_to_number 555syn keyword mpVardef validtexbox varfmt verbatim 556syn keyword mpPrimaryDef asgroup infont normalinfont shadedinto 557syn keyword mpPrimaryDef shownshadecenter shownshadedirection 558syn keyword mpPrimaryDef shownshadeorigin shownshadevector withshade 559syn keyword mpPrimaryDef withshademethod 560syn keyword mpNewInternal colorburntransparent colordodgetransparent 561syn keyword mpNewInternal colortransparent darkentransparent 562syn keyword mpNewInternal differencetransparent exclusiontransparent 563syn keyword mpNewInternal hardlighttransparent huetransparent 564syn keyword mpNewInternal lightentransparent luminositytransparent 565syn keyword mpNewInternal multiplytransparent normaltransparent 566syn keyword mpNewInternal overlaytransparent saturationtransparent 567syn keyword mpNewInternal screentransparent shadefactor softlighttransparent 568syn keyword mpNewInternal textextoffset 569syn keyword mpType property transparency 570syn keyword mpVariable currentoutlinetext shadeddown shadedleft 571syn keyword mpVariable shadedright shadedup shadeoffset trace_shades 572syn keyword mpConstant context_mlib 573" mp-page.mpiv 574syn keyword mpDef BoundCoverAreas BoundPageAreas Enlarged FakeRule 575syn keyword mpDef FakeWord LoadPageState OverlayBox RuleColor 576syn keyword mpDef SetAreaVariables SetPageArea SetPageBackPage 577syn keyword mpDef SetPageCoverPage SetPageField SetPageFrontPage 578syn keyword mpDef SetPageHsize SetPageHstep SetPageLocation 579syn keyword mpDef SetPagePage SetPageSpine SetPageVariables 580syn keyword mpDef SetPageVsize SetPageVstep StartCover StartPage 581syn keyword mpDef StopCover StopPage SwapPageState innerenlarged 582syn keyword mpDef llEnlarged lrEnlarged outerenlarged ulEnlarged 583syn keyword mpDef urEnlarged 584syn keyword mpVardef BackPageHeight BackPageWidth BackSpace BaseLineSkip 585syn keyword mpVardef BodyFontSize BottomDistance BottomHeight 586syn keyword mpVardef BottomSpace CoverHeight CoverWidth CurrentColumn 587syn keyword mpVardef CurrentHeight CurrentWidth CutSpace EmWidth 588syn keyword mpVardef ExHeight FooterDistance FooterHeight 589syn keyword mpVardef FrontPageHeight FrontPageWidth HSize HeaderDistance 590syn keyword mpVardef HeaderHeight InPageBody InnerEdgeDistance 591syn keyword mpVardef InnerEdgeWidth InnerMarginDistance InnerMarginWidth 592syn keyword mpVardef InnerSpaceWidth LastPageNumber LayoutColumnDistance 593syn keyword mpVardef LayoutColumnWidth LayoutColumns LeftEdgeDistance 594syn keyword mpVardef LeftEdgeWidth LeftMarginDistance LeftMarginWidth 595syn keyword mpVardef LineHeight MakeupHeight MakeupWidth NOfColumns 596syn keyword mpVardef NOfPages OnOddPage OnRightPage OuterEdgeDistance 597syn keyword mpVardef OuterEdgeWidth OuterMarginDistance OuterMarginWidth 598syn keyword mpVardef OuterSpaceWidth OverlayDepth OverlayHeight 599syn keyword mpVardef OverlayLineWidth OverlayOffset OverlayWidth 600syn keyword mpVardef PageDepth PageFraction PageNumber PageOffset 601syn keyword mpVardef PaperBleed PaperHeight PaperWidth PrintPaperHeight 602syn keyword mpVardef PrintPaperWidth RealPageNumber RightEdgeDistance 603syn keyword mpVardef RightEdgeWidth RightMarginDistance RightMarginWidth 604syn keyword mpVardef SpineHeight SpineWidth StrutDepth StrutHeight 605syn keyword mpVardef TextHeight TextWidth TopDistance TopHeight TopSkip 606syn keyword mpVardef TopSpace VSize defaultcolormodel 607syn keyword mpVariable Area BackPage CoverPage CurrentLayout Field 608syn keyword mpVariable FrontPage HorPos Hsize Hstep Location Page 609syn keyword mpVariable PageStateAvailable RuleDepth RuleDirection 610syn keyword mpVariable RuleFactor RuleH RuleHeight RuleOffset RuleOption 611syn keyword mpVariable RuleThickness RuleV RuleWidth Spine VerPos Vsize 612syn keyword mpVariable Vstep 613syn keyword mpConstant context_page 614" mp-shap.mpiv 615syn keyword mpDef drawline drawshape some_shape 616syn keyword mpDef start_predefined_shape_definition 617syn keyword mpDef stop_predefined_shape_definition 618syn keyword mpVardef drawpredefinedline drawpredefinedshape 619syn keyword mpVardef some_shape_path 620syn keyword mpVariable predefined_shapes predefined_shapes_xradius 621syn keyword mpVariable predefined_shapes_xxradius 622syn keyword mpVariable predefined_shapes_yradius 623syn keyword mpVariable predefined_shapes_yyradius 624syn keyword mpConstant context_shap 625" mp-step.mpiv 626syn keyword mpDef initialize_step_variables midbottomboundary 627syn keyword mpDef midtopboundary step_begin_cell step_begin_chart 628syn keyword mpDef step_cell_ali step_cell_bot step_cell_top 629syn keyword mpDef step_cells step_end_cell step_end_chart 630syn keyword mpDef step_text_bot step_text_mid step_text_top 631syn keyword mpDef step_texts 632syn keyword mpVariable cell_distance_x cell_distance_y cell_fill_color 633syn keyword mpVariable cell_line_color cell_line_width cell_offset 634syn keyword mpVariable chart_align chart_category chart_vertical 635syn keyword mpVariable line_distance line_height line_line_color 636syn keyword mpVariable line_line_width line_offset nofcells 637syn keyword mpVariable text_distance_set text_fill_color text_line_color 638syn keyword mpVariable text_line_width text_offset 639syn keyword mpConstant context_cell 640" mp-symb.mpiv 641syn keyword mpDef finishglyph prepareglyph 642syn keyword mpConstant lefttriangle midbar onebar righttriangle sidebar 643syn keyword mpConstant sublefttriangle subrighttriangle twobar 644" mp-text.mpiv 645syn keyword mpDef build_parshape 646syn keyword mpVardef found_point 647syn keyword mpVariable trace_parshape 648syn keyword mpConstant context_text 649" mp-tool.mpiv 650syn keyword mpCommand dump 651syn keyword mpDef addbackground b_color beginglyph break centerarrow 652syn keyword mpDef clearxy condition data_mpd_file detaileddraw 653syn keyword mpDef detailpaths dowithpath draw drawboundary 654syn keyword mpDef drawboundingbox drawcontrollines drawcontrolpoints 655syn keyword mpDef drawfill draworigin drawpath drawpathonly 656syn keyword mpDef drawpathwithpoints drawpoint drawpointlabels 657syn keyword mpDef drawpoints drawticks drawwholepath drawxticks 658syn keyword mpDef drawyticks endglyph fill finishsavingdata g_color 659syn keyword mpDef inner_boundingbox job_name leftarrow loadmodule 660syn keyword mpDef midarrowhead naturalizepaths newboolean newcolor 661syn keyword mpDef newnumeric newpair newpath newpicture newstring 662syn keyword mpDef newtransform normalcolors normaldraw normalfill 663syn keyword mpDef normalwithcolor outer_boundingbox pop_boundingbox 664syn keyword mpDef popboundingbox popcurrentpicture push_boundingbox 665syn keyword mpDef pushboundingbox pushcurrentpicture r_color readfile 666syn keyword mpDef recolor redraw refill register_dirty_chars 667syn keyword mpDef remapcolor remapcolors remappedcolor reprocess 668syn keyword mpDef resetarrows resetcolormap resetdrawoptions 669syn keyword mpDef resolvedcolor restroke retext rightarrow savedata 670syn keyword mpDef saveoptions scale_currentpicture set_ahlength 671syn keyword mpDef set_grid showgrid startplaincompatibility 672syn keyword mpDef startsavingdata stopplaincompatibility 673syn keyword mpDef stopsavingdata stripe_path_a stripe_path_n undashed 674syn keyword mpDef undrawfill untext visualizeddraw visualizedfill 675syn keyword mpDef visualizepaths withcolor withgray 676syn keyword mpDef xscale_currentpicture xshifted 677syn keyword mpDef xyscale_currentpicture yscale_currentpicture 678syn keyword mpDef yshifted 679syn keyword mpVardef acos acosh anglebetween area arrowhead 680syn keyword mpVardef arrowheadonpath arrowpath asciistring asin asinh 681syn keyword mpVardef atan basiccolors bbheight bbwidth bcomponent 682syn keyword mpVardef blackcolor bottomboundary boundingbox c_phantom 683syn keyword mpVardef ccomponent center cleanstring colorcircle 684syn keyword mpVardef colordecimals colordecimalslist colorlike colorpart 685syn keyword mpVardef colortype complementary complemented copylist cos 686syn keyword mpVardef cosh cot cotd curved ddddecimal dddecimal ddecimal 687syn keyword mpVardef decorated drawarrowpath epsed exp freedotlabel 688syn keyword mpVardef freelabel gcomponent getunstringed grayed greyed 689syn keyword mpVardef hsvtorgb infinite innerboundingbox interpolated inv 690syn keyword mpVardef invcos inverted invsin invtan laddered leftboundary 691syn keyword mpVardef leftpath leftrightpath listsize listtocurves 692syn keyword mpVardef listtolines ln log mcomponent new_on_grid 693syn keyword mpVardef outerboundingbox paired pen_size penpoint phantom 694syn keyword mpVardef pointarrow pow punked rangepath rcomponent 695syn keyword mpVardef redecorated repathed rightboundary rightpath 696syn keyword mpVardef rotation roundedsquare set_inner_boundingbox 697syn keyword mpVardef set_outer_boundingbox setunstringed shapedlist 698syn keyword mpVardef simplified sin sinh sortlist sqr straightpath tan 699syn keyword mpVardef tand tanh tensecircle thefreelabel topboundary 700syn keyword mpVardef tripled undecorated unitvector unspiked unstringed 701syn keyword mpVardef whitecolor ycomponent 702syn keyword mpPrimaryDef along blownup bottomenlarged cornered crossed 703syn keyword mpPrimaryDef enlarged enlonged leftenlarged llenlarged llmoved 704syn keyword mpPrimaryDef lrenlarged lrmoved on paralleled randomized 705syn keyword mpPrimaryDef randomizedcontrols randomshifted rightenlarged 706syn keyword mpPrimaryDef shortened sized smoothed snapped softened squeezed 707syn keyword mpPrimaryDef stretched superellipsed topenlarged ulenlarged 708syn keyword mpPrimaryDef ulmoved uncolored urenlarged urmoved xsized 709syn keyword mpPrimaryDef xstretched xyscaled xysized ysized ystretched zmod 710syn keyword mpSecondaryDef anglestriped intersection_point numberstriped 711syn keyword mpSecondaryDef peepholed 712syn keyword mpTertiaryDef cutends 713syn keyword mpNewInternal ahdimple ahvariant anglelength anglemethod 714syn keyword mpNewInternal angleoffset charscale cmykcolormodel graycolormodel 715syn keyword mpNewInternal greycolormodel maxdimensions metapostversion 716syn keyword mpNewInternal nocolormodel rgbcolormodel striped_normal_inner 717syn keyword mpNewInternal striped_normal_outer striped_reverse_inner 718syn keyword mpNewInternal striped_reverse_outer 719syn keyword mpType grayscale greyscale quadruplet triplet 720syn keyword mpVariable ahfactor collapse_data color_map drawoptionsfactor 721syn keyword mpVariable freedotlabelsize freelabeloffset grid grid_full 722syn keyword mpVariable grid_h grid_left grid_nx grid_ny grid_w grid_x 723syn keyword mpVariable grid_y intersection_found originlength 724syn keyword mpVariable plain_compatibility_data pointlabelfont 725syn keyword mpVariable pointlabelscale refillbackground savingdata 726syn keyword mpVariable savingdatadone swappointlabels ticklength tickstep 727syn keyword mpConstant CRLF DQUOTE PERCENT SPACE bcircle context_tool crlf 728syn keyword mpConstant darkblue darkcyan darkgray darkgreen darkmagenta 729syn keyword mpConstant darkred darkyellow downtriangle dquote freesquare 730syn keyword mpConstant fulldiamond fullsquare fulltriangle lcircle 731syn keyword mpConstant lefttriangle lightgray llcircle lltriangle lrcircle 732syn keyword mpConstant lrtriangle mpversion nocolor noline oddly 733syn keyword mpConstant originpath percent rcircle righttriangle space 734syn keyword mpConstant tcircle triangle ulcircle ultriangle unitcircle 735syn keyword mpConstant unitdiamond unittriangle uptriangle urcircle 736syn keyword mpConstant urtriangle 737endif " MetaFun macros 738 739" Define the default highlighting 740hi def link mpTeXdelim mpPrimitive 741hi def link mpBoolExp mfBoolExp 742hi def link mpNumExp mfNumExp 743hi def link mpPairExp mfPairExp 744hi def link mpPathExp mfPathExp 745hi def link mpPenExp mfPenExp 746hi def link mpPicExp mfPicExp 747hi def link mpStringExp mfStringExp 748hi def link mpInternal mfInternal 749hi def link mpCommand mfCommand 750hi def link mpType mfType 751hi def link mpPrimitive mfPrimitive 752hi def link mpDef mfDef 753hi def link mpVardef mpDef 754hi def link mpPrimaryDef mpDef 755hi def link mpSecondaryDef mpDef 756hi def link mpTertiaryDef mpDef 757hi def link mpNewInternal mpInternal 758hi def link mpVariable mfVariable 759hi def link mpConstant mfConstant 760hi def link mpOnOff mpPrimitive 761hi def link mpDash mpPrimitive 762hi def link mpTeXKeyword Identifier 763 764let b: current_syntax = "mp" 765 766let & cpo = s: cpo_sav 767unlet ! s: cpo_sav 768 769" vim:sw=2