1071d4279SBram Moolenaar" Vim syntax file 242eeac35SBram Moolenaar" Language: Quake[1-3] configuration file 3*214641f7SBram Moolenaar" Previous Maintainer: Nikolai Weibull <[email protected]> 48c8de839SBram Moolenaar" Latest Revision: 2007-06-17 557657d85SBram Moolenaar" quake_is_quake1 - the syntax is to be used for quake1 configs 6071d4279SBram Moolenaar" quake_is_quake2 - the syntax is to be used for quake2 configs 7071d4279SBram Moolenaar" quake_is_quake3 - the syntax is to be used for quake3 configs 857657d85SBram Moolenaar" Credits: Tomasz Kalkosinski wrote the original quake3Colors stuff 9071d4279SBram Moolenaar 1042eeac35SBram Moolenaarif exists("b:current_syntax") 11071d4279SBram Moolenaar finish 12071d4279SBram Moolenaarendif 13071d4279SBram Moolenaar 1442eeac35SBram Moolenaarlet s:cpo_save = &cpo 1542eeac35SBram Moolenaarset cpo&vim 16071d4279SBram Moolenaar 178c8de839SBram Moolenaarsetlocal iskeyword+=-,+ 18071d4279SBram Moolenaar 19071d4279SBram Moolenaarsyn keyword quakeTodo contained TODO FIXME XXX NOTE 20071d4279SBram Moolenaar 2142eeac35SBram Moolenaarsyn region quakeComment display oneline start='//' end='$' end=';' 2242eeac35SBram Moolenaar \ keepend contains=quakeTodo,@Spell 23071d4279SBram Moolenaar 2442eeac35SBram Moolenaarsyn region quakeString display oneline start=+"+ skip=+\\\\\|\\"+ 2557657d85SBram Moolenaar \ end=+"\|$+ contains=quakeNumbers, 2657657d85SBram Moolenaar \ @quakeCommands,@quake3Colors 27071d4279SBram Moolenaar 28071d4279SBram Moolenaarsyn case ignore 2942eeac35SBram Moolenaar 3057657d85SBram Moolenaarsyn match quakeNumbers display transparent '\<-\=\d\|\.\d' 3142eeac35SBram Moolenaar \ contains=quakeNumber,quakeFloat, 3242eeac35SBram Moolenaar \ quakeOctalError,quakeOctal 3342eeac35SBram Moolenaarsyn match quakeNumber contained display '\d\+\>' 3457657d85SBram Moolenaarsyn match quakeFloat contained display '\d\+\.\d*' 3557657d85SBram Moolenaarsyn match quakeFloat contained display '\.\d\+\>' 3657657d85SBram Moolenaar 3757657d85SBram Moolenaarif exists("quake_is_quake1") || exists("quake_is_quake2") 3842eeac35SBram Moolenaar syn match quakeOctal contained display '0\o\+\>' 3942eeac35SBram Moolenaar \ contains=quakeOctalZero 4042eeac35SBram Moolenaar syn match quakeOctalZero contained display '\<0' 4142eeac35SBram Moolenaar syn match quakeOctalError contained display '0\o*[89]\d*' 4257657d85SBram Moolenaarendif 4342eeac35SBram Moolenaar 4442eeac35SBram Moolenaarsyn cluster quakeCommands contains=quakeCommand,quake1Command, 4542eeac35SBram Moolenaar \ quake12Command,Quake2Command,Quake23Command, 4642eeac35SBram Moolenaar \ Quake3Command 47071d4279SBram Moolenaar 48071d4279SBram Moolenaarsyn keyword quakeCommand +attack +back +forward +left +lookdown +lookup 49071d4279SBram Moolenaarsyn keyword quakeCommand +mlook +movedown +moveleft +moveright +moveup 50071d4279SBram Moolenaarsyn keyword quakeCommand +right +speed +strafe -attack -back bind 51071d4279SBram Moolenaarsyn keyword quakeCommand bindlist centerview clear connect cvarlist dir 52071d4279SBram Moolenaarsyn keyword quakeCommand disconnect dumpuser echo error exec -forward 53071d4279SBram Moolenaarsyn keyword quakeCommand god heartbeat joy_advancedupdate kick kill 54071d4279SBram Moolenaarsyn keyword quakeCommand killserver -left -lookdown -lookup map 55071d4279SBram Moolenaarsyn keyword quakeCommand messagemode messagemode2 -mlook modellist 56071d4279SBram Moolenaarsyn keyword quakeCommand -movedown -moveleft -moveright -moveup play 57071d4279SBram Moolenaarsyn keyword quakeCommand quit rcon reconnect record -right say say_team 58071d4279SBram Moolenaarsyn keyword quakeCommand screenshot serverinfo serverrecord serverstop 59071d4279SBram Moolenaarsyn keyword quakeCommand set sizedown sizeup snd_restart soundinfo 60071d4279SBram Moolenaarsyn keyword quakeCommand soundlist -speed spmap status -strafe stopsound 61071d4279SBram Moolenaarsyn keyword quakeCommand toggleconsole unbind unbindall userinfo pause 62071d4279SBram Moolenaarsyn keyword quakeCommand vid_restart viewpos wait weapnext weapprev 63071d4279SBram Moolenaar 64071d4279SBram Moolenaarif exists("quake_is_quake1") 65071d4279SBram Moolenaar syn keyword quake1Command sv 66071d4279SBram Moolenaarendif 67071d4279SBram Moolenaar 68071d4279SBram Moolenaarif exists("quake_is_quake1") || exists("quake_is_quake2") 69071d4279SBram Moolenaar syn keyword quake12Command +klook alias cd impulse link load save 70071d4279SBram Moolenaar syn keyword quake12Command timerefresh changing info loading 71071d4279SBram Moolenaar syn keyword quake12Command pingservers playerlist players score 72071d4279SBram Moolenaarendif 73071d4279SBram Moolenaar 74071d4279SBram Moolenaarif exists("quake_is_quake2") 75071d4279SBram Moolenaar syn keyword quake2Command cmd demomap +use condump download drop gamemap 76071d4279SBram Moolenaar syn keyword quake2Command give gun_model setmaster sky sv_maplist wave 77071d4279SBram Moolenaar syn keyword quake2Command cmdlist gameversiona gun_next gun_prev invdrop 78071d4279SBram Moolenaar syn keyword quake2Command inven invnext invnextp invnextw invprev 79071d4279SBram Moolenaar syn keyword quake2Command invprevp invprevw invuse menu_addressbook 80071d4279SBram Moolenaar syn keyword quake2Command menu_credits menu_dmoptions menu_game 81071d4279SBram Moolenaar syn keyword quake2Command menu_joinserver menu_keys menu_loadgame 82071d4279SBram Moolenaar syn keyword quake2Command menu_main menu_multiplayer menu_options 83071d4279SBram Moolenaar syn keyword quake2Command menu_playerconfig menu_quit menu_savegame 84071d4279SBram Moolenaar syn keyword quake2Command menu_startserver menu_video 85071d4279SBram Moolenaar syn keyword quake2Command notarget precache prog togglechat vid_front 86071d4279SBram Moolenaar syn keyword quake2Command weaplast 87071d4279SBram Moolenaarendif 88071d4279SBram Moolenaar 89071d4279SBram Moolenaarif exists("quake_is_quake2") || exists("quake_is_quake3") 90071d4279SBram Moolenaar syn keyword quake23Command imagelist modellist path z_stats 91071d4279SBram Moolenaarendif 92071d4279SBram Moolenaar 93071d4279SBram Moolenaarif exists("quake_is_quake3") 94071d4279SBram Moolenaar syn keyword quake3Command +info +scores +zoom addbot arena banClient 95071d4279SBram Moolenaar syn keyword quake3Command banUser callteamvote callvote changeVectors 96071d4279SBram Moolenaar syn keyword quake3Command cinematic clientinfo clientkick cmd cmdlist 97071d4279SBram Moolenaar syn keyword quake3Command condump configstrings crash cvar_restart devmap 98071d4279SBram Moolenaar syn keyword quake3Command fdir follow freeze fs_openedList Fs_pureList 99071d4279SBram Moolenaar syn keyword quake3Command Fs_referencedList gfxinfo globalservers 100071d4279SBram Moolenaar syn keyword quake3Command hunk_stats in_restart -info levelshot 101071d4279SBram Moolenaar syn keyword quake3Command loaddeferred localservers map_restart mem_info 102071d4279SBram Moolenaar syn keyword quake3Command messagemode3 messagemode4 midiinfo model music 103071d4279SBram Moolenaar syn keyword quake3Command modelist net_restart nextframe nextskin noclip 104071d4279SBram Moolenaar syn keyword quake3Command notarget ping prevframe prevskin reset restart 105071d4279SBram Moolenaar syn keyword quake3Command s_disable_a3d s_enable_a3d s_info s_list s_stop 106071d4279SBram Moolenaar syn keyword quake3Command scanservers -scores screenshotJPEG sectorlist 107071d4279SBram Moolenaar syn keyword quake3Command serverstatus seta setenv sets setu setviewpos 108071d4279SBram Moolenaar syn keyword quake3Command shaderlist showip skinlist spdevmap startOribt 109071d4279SBram Moolenaar syn keyword quake3Command stats stopdemo stoprecord systeminfo togglemenu 110071d4279SBram Moolenaar syn keyword quake3Command tcmd team teamtask teamvote tell tell_attacker 111071d4279SBram Moolenaar syn keyword quake3Command tell_target testgun testmodel testshader toggle 112071d4279SBram Moolenaar syn keyword quake3Command touchFile vminfo vmprofile vmtest vosay 113071d4279SBram Moolenaar syn keyword quake3Command vosay_team vote votell vsay vsay_team vstr 114071d4279SBram Moolenaar syn keyword quake3Command vtaunt vtell vtell_attacker vtell_target weapon 115071d4279SBram Moolenaar syn keyword quake3Command writeconfig -zoom 116071d4279SBram Moolenaar syn match quake3Command display "\<[+-]button\(\d\|1[0-4]\)\>" 117071d4279SBram Moolenaarendif 118071d4279SBram Moolenaar 11957657d85SBram Moolenaarif exists("quake_is_quake3") 12057657d85SBram Moolenaar syn cluster quake3Colors contains=quake3Red,quake3Green,quake3Yellow, 12157657d85SBram Moolenaar \ quake3Blue,quake3Cyan,quake3Purple,quake3White, 12257657d85SBram Moolenaar \ quake3Orange,quake3Grey,quake3Black,quake3Shadow 12357657d85SBram Moolenaar 12457657d85SBram Moolenaar syn region quake3Red contained start=+\^1+hs=e+1 end=+[$^"\n]+he=e-1 12557657d85SBram Moolenaar syn region quake3Green contained start=+\^2+hs=e+1 end=+[$^"\n]+he=e-1 12657657d85SBram Moolenaar syn region quake3Yellow contained start=+\^3+hs=e+1 end=+[$^"\n]+he=e-1 12757657d85SBram Moolenaar syn region quake3Blue contained start=+\^4+hs=e+1 end=+[$^"\n]+he=e-1 12857657d85SBram Moolenaar syn region quake3Cyan contained start=+\^5+hs=e+1 end=+[$^"\n]+he=e-1 12957657d85SBram Moolenaar syn region quake3Purple contained start=+\^6+hs=e+1 end=+[$^"\n]+he=e-1 13057657d85SBram Moolenaar syn region quake3White contained start=+\^7+hs=e+1 end=+[$^"\n]+he=e-1 13157657d85SBram Moolenaar syn region quake3Orange contained start=+\^8+hs=e+1 end=+[$^\"\n]+he=e-1 13257657d85SBram Moolenaar syn region quake3Grey contained start=+\^9+hs=e+1 end=+[$^"\n]+he=e-1 13357657d85SBram Moolenaar syn region quake3Black contained start=+\^0+hs=e+1 end=+[$^"\n]+he=e-1 13457657d85SBram Moolenaar syn region quake3Shadow contained start=+\^[Xx]+hs=e+1 end=+[$^"\n]+he=e-1 13557657d85SBram Moolenaarendif 13657657d85SBram Moolenaar 13742eeac35SBram Moolenaarhi def link quakeComment Comment 13842eeac35SBram Moolenaarhi def link quakeTodo Todo 13942eeac35SBram Moolenaarhi def link quakeString String 14042eeac35SBram Moolenaarhi def link quakeNumber Number 14142eeac35SBram Moolenaarhi def link quakeOctal Number 14242eeac35SBram Moolenaarhi def link quakeOctalZero PreProc 14342eeac35SBram Moolenaarhi def link quakeFloat Number 14442eeac35SBram Moolenaarhi def link quakeOctalError Error 14542eeac35SBram Moolenaarhi def link quakeCommand quakeCommands 14642eeac35SBram Moolenaarhi def link quake1Command quakeCommands 14742eeac35SBram Moolenaarhi def link quake12Command quakeCommands 14842eeac35SBram Moolenaarhi def link quake2Command quakeCommands 14942eeac35SBram Moolenaarhi def link quake23Command quakeCommands 15042eeac35SBram Moolenaarhi def link quake3Command quakeCommands 15142eeac35SBram Moolenaarhi def link quakeCommands Keyword 152071d4279SBram Moolenaar 15357657d85SBram Moolenaarif exists("quake_is_quake3") 15457657d85SBram Moolenaar hi quake3Red ctermfg=Red guifg=Red 15557657d85SBram Moolenaar hi quake3Green ctermfg=Green guifg=Green 15657657d85SBram Moolenaar hi quake3Yellow ctermfg=Yellow guifg=Yellow 15757657d85SBram Moolenaar hi quake3Blue ctermfg=Blue guifg=Blue 15857657d85SBram Moolenaar hi quake3Cyan ctermfg=Cyan guifg=Cyan 15957657d85SBram Moolenaar hi quake3Purple ctermfg=DarkMagenta guifg=Purple 16057657d85SBram Moolenaar hi quake3White ctermfg=White guifg=White 16157657d85SBram Moolenaar hi quake3Black ctermfg=Black guifg=Black 16257657d85SBram Moolenaar hi quake3Orange ctermfg=Brown guifg=Orange 16357657d85SBram Moolenaar hi quake3Grey ctermfg=LightGrey guifg=LightGrey 16457657d85SBram Moolenaar hi quake3Shadow cterm=underline gui=underline 16557657d85SBram Moolenaarendif 16657657d85SBram Moolenaar 16742eeac35SBram Moolenaarlet b:current_syntax = "quake" 168071d4279SBram Moolenaar 16942eeac35SBram Moolenaarlet &cpo = s:cpo_save 17042eeac35SBram Moolenaarunlet s:cpo_save 171