1" MUSHcode syntax file 2" Maintainer: Bek Oberin <[email protected]> 3" Last updated by Rimnal on Mon Aug 20 08:28:56 MDT 2001 4 5" For version 5.x: Clear all syntax items 6" For version 6.x: Quit when a syntax file was already loaded 7if version < 600 8 syntax clear 9elseif exists("b:current_syntax") 10 finish 11endif 12 13 14" regular mush functions 15syntax keyword mushFunction contained abs acos add after and andflags aposs 16syntax keyword mushFunction contained asin atan before capstr cat ceil center 17syntax keyword mushFunction contained comp con conn controls convsecs convtime 18syntax keyword mushFunction contained cos default delete dist2d dist3d div e 19syntax keyword mushFunction contained edefault edit elements elock eq escape 20syntax keyword mushFunction contained exit exp extract fdiv filter first flags 21syntax keyword mushFunction contained floor fold foreach findable fullname get 22syntax keyword mushFunction contained get_eval grab gt gte hasattr hasflag 23syntax keyword mushFunction contained home idle index insert isdbref isnum 24syntax keyword mushFunction contained isword iter last lattr lcon lcstr 25syntax keyword mushFunction contained ldelete left lexits ljust ln lnum loc 26syntax keyword mushFunction contained locate lock log lpos lt lte lwho map 27syntax keyword mushFunction contained match matchall max member merge mid min 28syntax keyword mushFunction contained mix mod money mudname mul munge name 29syntax keyword mushFunction contained nearby neq next not num obj objeval 30syntax keyword mushFunction contained objmem or orflags owner parent parse pi 31syntax keyword mushFunction contained ports pos poss power r rand remove repeat 32syntax keyword mushFunction contained replace rest reverse revwords right 33syntax keyword mushFunction contained rjust rloc room round s scramble search 34syntax keyword mushFunction contained secs secure setdiff setinter setq 35syntax keyword mushFunction contained setunion shuffle sign sin sort sortby 36syntax keyword mushFunction contained space splice sqrt squish starttime stats 37syntax keyword mushFunction contained strlen strmatch sub subj switch tan time 38syntax keyword mushFunction contained trim trunc type u ucstr udefault ulocal 39syntax keyword mushFunction contained v version visible where wordpos words 40syntax keyword mushFunction contained xcon xor 41" only highligh functions when they have an in-bracket immediately after 42syntax match mushFunctionBrackets "\i\I*(" contains=mushFunction 43 44" regular mush commands 45syntax keyword mushAtCommandList contained @alias @chown @clone @create 46syntax keyword mushAtCommandList contained @decompile @destroy @doing @dolist 47syntax keyword mushAtCommandList contained @drain @edit @emit @entrances @femit 48syntax keyword mushAtCommandList contained @force @fpose @fsay @halt @last 49syntax keyword mushAtCommandList contained @link @list @listmotd @lock @mudwho 50syntax keyword mushAtCommandList contained @mvattr @name @notify @oemit @parent 51syntax keyword mushAtCommandList contained @password @pemit @ps @quota @robot 52syntax keyword mushAtCommandList contained @search @set @stats @sweep @switch 53syntax keyword mushAtCommandList contained @teleport @trigger @unlink @unlock 54syntax keyword mushAtCommandList contained @verb @wait @wipe 55syntax match mushCommand "@\i\I*" contains=mushAtCommandList 56 57 58syntax keyword mushCommand drop enter examine get give goto help inventory 59syntax keyword mushCommand kill leave look news page pose say score use 60syntax keyword mushCommand version whisper DOING LOGOUT OUTPUTPREFIX 61syntax keyword mushCommand OUTPUTSUFFIX QUIT SESSION WHO 62 63syntax match mushSpecial "\*\|!\|=\|-\|\\\|+" 64syntax match mushSpecial2 contained "\*" 65 66syntax match mushIdentifier "&[^ ]\+" 67 68syntax match mushVariable "%r\|%t\|%cr\|%[A-Za-z0-9]\+\|%#\|##\|here" 69 70" numbers 71syntax match mushNumber +[0-9]\++ 72 73" A comment line starts with a or # or " at the start of the line 74" or an @@ 75syntax keyword mushTodo contained TODO FIXME XXX 76syntax match mushComment +^\s*@@.*$+ contains=mushTodo 77syntax match mushComment +^".*$+ contains=mushTodo 78syntax match mushComment +^#.*$+ contains=mushTodo 79 80syntax region mushFuncBoundaries start="\[" end="\]" contains=mushFunction,mushFlag,mushAttributes,mushNumber,mushCommand,mushVariable,mushSpecial2 81 82" FLAGS 83syntax keyword mushFlag PLAYER ABODE BUILDER CHOWN_OK DARK FLOATING 84syntax keyword mushFlag GOING HAVEN INHERIT JUMP_OK KEY LINK_OK MONITOR 85syntax keyword mushFlag NOSPOOF OPAQUE QUIET STICKY TRACE UNFINDABLE VISUAL 86syntax keyword mushFlag WIZARD PARENT_OK ZONE AUDIBLE CONNECTED DESTROY_OK 87syntax keyword mushFlag ENTER_OK HALTED IMMORTAL LIGHT MYOPIC PUPPET TERSE 88syntax keyword mushFlag ROBOT SAFE TRANSPARENT VERBOSE CONTROL_OK COMMANDS 89 90syntax keyword mushAttribute aahear aclone aconnect adesc adfail adisconnect 91syntax keyword mushAttribute adrop aefail aenter afail agfail ahear akill 92syntax keyword mushAttribute aleave alfail alias amhear amove apay arfail 93syntax keyword mushAttribute asucc atfail atport aufail ause away charges 94syntax keyword mushAttribute cost desc dfail drop ealias efail enter fail 95syntax keyword mushAttribute filter forwardlist gfail idesc idle infilter 96syntax keyword mushAttribute inprefix kill lalias last lastsite leave lfail 97syntax keyword mushAttribute listen move odesc odfail odrop oefail oenter 98syntax keyword mushAttribute ofail ogfail okill oleave olfail omove opay 99syntax keyword mushAttribute orfail osucc otfail otport oufail ouse oxenter 100syntax keyword mushAttribute oxleave oxtport pay prefix reject rfail runout 101syntax keyword mushAttribute semaphore sex startup succ tfail tport ufail 102syntax keyword mushAttribute use va vb vc vd ve vf vg vh vi vj vk vl vm vn 103syntax keyword mushAttribute vo vp vq vr vs vt vu vv vw vx vy vz 104 105 106if version >= 508 || !exists("did_mush_syntax_inits") 107 if version < 508 108 let did_mush_syntax_inits = 1 109 command -nargs=+ HiLink hi link <args> 110 else 111 command -nargs=+ HiLink hi def link <args> 112 endif 113 114 " The default methods for highlighting. Can be overridden later 115 HiLink mushAttribute Constant 116 HiLink mushCommand Function 117 HiLink mushComment Comment 118 HiLink mushNumber Number 119 HiLink mushSetting PreProc 120 HiLink mushFunction Statement 121 HiLink mushVariable Identifier 122 HiLink mushSpecial Special 123 HiLink mushTodo Todo 124 HiLink mushFlag Special 125 HiLink mushIdentifier Identifier 126 127 delcommand HiLink 128endif 129 130let b:current_syntax = "mush" 131 132" mush: ts=17 133