home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / quake.vim < prev    next >
Encoding:
Text File  |  2003-04-25  |  6.6 KB  |  163 lines

  1. " Vim syntax file
  2. " Language:        Quake[1-3] Configuration File.
  3. " Maintainer:        Nikolai 'pcp' Weibull <da.box@home.se>
  4. " Latest Revision: 2002-07-31
  5. " Variables:    quake_is_quake1 - the syntax is to be used for quake1 configs
  6. "        quake_is_quake2 - the syntax is to be used for quake2 configs
  7. "        quake_is_quake3 - the syntax is to be used for quake3 configs
  8.  
  9.  
  10. if version < 600
  11.     syntax clear
  12. elseif exists("b:current_syntax")
  13.     finish
  14. endif
  15.  
  16.  
  17. " Set iskeyword since we need `-' (and potentially others) in keywords.
  18. " For version 5.x: Set it globally
  19. " For version 6.x: Set it locally
  20. if version >= 600
  21.     command -nargs=1 SetIsk setlocal iskeyword=<args>
  22. else
  23.     command -nargs=1 SetIsk set iskeyword=<args>
  24. endif
  25. SetIsk 48-57,65-90,97-122,+,-,_
  26. delcommand SetIsk
  27.  
  28.  
  29. " comments
  30. syn region    quakeComment    display oneline start="//" end="$" keepend contains=quakeTodo
  31.  
  32. " todo
  33. syn keyword    quakeTodo    contained TODO FIXME XXX
  34.  
  35. " string (can contain numbers (which should be hilighted as such)
  36. syn region    quakeString    display oneline start=+"+ skip=+\\"+ end=+"\|$+ contains=quakeNumbers,@quakeCommands
  37.  
  38. " number
  39. syn case ignore
  40. syn match    quakeNumbers    display transparent "\<\d\|\.\d" contains=quakeNumber,quakeFloat,quakeOctalError,quakeOctal
  41. syn match    quakeNumber    display contained "\d\+\>"
  42. " Flag the first zero of an octal number as something special
  43. syn match    quakeOctal    display contained "0\o\+\>" contains=quakeOctalZero
  44. syn match    quakeOctalZero    display contained "\<0"
  45. " floating point number, with dot
  46. syn match    quakeFloat    display contained "\d\+\.\d*"
  47. " floating point number, starting with a dot
  48. syn match    quakeFloat    display contained "\.\d\+\>"
  49. " flag an octal number with wrong digits
  50. syn match    quakeOctalError    display contained "0\o*[89]\d*"
  51. syn case match
  52.  
  53. " commands
  54. syn case ignore
  55. syn cluster    quakeCommands    contains=quakeCommand,quake1Command,quake12Command,Quake2Command,Quake23Command,Quake3Command
  56.  
  57. syn keyword    quakeCommand    +attack +back +forward +left +lookdown +lookup
  58. syn keyword    quakeCommand    +mlook +movedown +moveleft +moveright +moveup
  59. syn keyword    quakeCommand    +right +speed +strafe -attack -back bind
  60. syn keyword    quakeCommand    bindlist centerview clear connect cvarlist dir
  61. syn keyword    quakeCommand    disconnect dumpuser echo error exec -forward
  62. syn keyword    quakeCommand    god heartbeat joy_advancedupdate kick kill
  63. syn keyword    quakeCommand    killserver -left -lookdown -lookup map
  64. syn keyword    quakeCommand    messagemode messagemode2 -mlook modellist
  65. syn keyword    quakeCommand    -movedown -moveleft -moveright -moveup play
  66. syn keyword    quakeCommand    quit rcon reconnect record -right say say_team
  67. syn keyword    quakeCommand    screenshot serverinfo serverrecord serverstop
  68. syn keyword    quakeCommand    set sizedown sizeup snd_restart soundinfo
  69. syn keyword    quakeCommand    soundlist -speed spmap status -strafe stopsound
  70. syn keyword    quakeCommand    toggleconsole unbind unbindall userinfo pause
  71. syn keyword    quakeCommand    vid_restart viewpos wait weapnext weapprev
  72.  
  73. if exists("quake_is_quake1")
  74. syn keyword    quake1Command    sv
  75. endif
  76.  
  77. if exists("quake_is_quake1") || exists("quake_is_quake2")
  78. syn keyword    quake12Command    +klook alias cd impulse link load save
  79. syn keyword    quake12Command    timerefresh changing info loading
  80. syn keyword    quake12Command    pingservers playerlist players score
  81. endif
  82.  
  83. if exists("quake_is_quake2")
  84. syn keyword    quake2Command    cmd demomap +use condump download drop gamemap
  85. syn keyword    quake2Command    give gun_model setmaster sky sv_maplist wave
  86. syn keyword    quake2Command    cmdlist gameversiona gun_next gun_prev invdrop
  87. syn keyword    quake2Command    inven invnext invnextp invnextw invprev
  88. syn keyword    quake2Command    invprevp invprevw invuse menu_addressbook
  89. syn keyword    quake2Command    menu_credits menu_dmoptions menu_game
  90. syn keyword    quake2Command    menu_joinserver menu_keys menu_loadgame
  91. syn keyword    quake2Command    menu_main menu_multiplayer menu_options
  92. syn keyword    quake2Command    menu_playerconfig menu_quit menu_savegame
  93. syn keyword    quake2Command    menu_startserver menu_video
  94. syn keyword    quake2Command    notarget precache prog togglechat vid_front
  95. syn keyword    quake2Command    weaplast
  96. endif
  97.  
  98. if exists("quake_is_quake2") || exists("quake_is_quake3")
  99. syn keyword    quake23Command    imagelist modellist path z_stats
  100. endif
  101.  
  102. if exists("quake_is_quake3")
  103. syn keyword    quake3Command    +info +scores +zoom addbot arena banClient
  104. syn keyword    quake3Command    banUser callteamvote callvote changeVectors
  105. syn keyword    quake3Command    cinematic clientinfo clientkick cmd cmdlist
  106. syn keyword    quake3Command    condump configstrings crash cvar_restart devmap
  107. syn keyword    quake3Command    fdir follow freeze fs_openedList Fs_pureList
  108. syn keyword    quake3Command    Fs_referencedList gfxinfo globalservers
  109. syn keyword    quake3Command    hunk_stats in_restart -info levelshot
  110. syn keyword    quake3Command    loaddeferred localservers map_restart mem_info
  111. syn keyword    quake3Command    messagemode3 messagemode4 midiinfo model music
  112. syn keyword    quake3Command    modelist net_restart nextframe nextskin noclip
  113. syn keyword    quake3Command    notarget ping prevframe prevskin reset restart
  114. syn keyword    quake3Command    s_disable_a3d s_enable_a3d s_info s_list s_stop
  115. syn keyword    quake3Command    scanservers -scores screenshotJPEG sectorlist
  116. syn keyword    quake3Command    serverstatus seta setenv sets setu setviewpos
  117. syn keyword    quake3Command    shaderlist showip skinlist spdevmap startOribt
  118. syn keyword    quake3Command    stats stopdemo stoprecord systeminfo togglemenu
  119. syn keyword    quake3Command    tcmd team teamtask teamvote tell tell_attacker
  120. syn keyword    quake3Command    tell_target testgun testmodel testshader toggle
  121. syn keyword    quake3Command    touchFile vminfo vmprofile vmtest vosay
  122. syn keyword    quake3Command    vosay_team vote votell vsay vsay_team vstr
  123. syn keyword    quake3Command    vtaunt vtell vtell_attacker vtell_target weapon
  124. syn keyword    quake3Command    writeconfig -zoom
  125. syn match    quake3Command    display "\<[+-]button\(\d\|1[0-4]\)\>"
  126. endif
  127.  
  128. syn case match
  129.  
  130. " Define the default highlighting.
  131. " For version 5.7 and earlier: only when not done already
  132. " For version 5.8 and later: only when an item doesn't have highlighting yet
  133. if version >= 508 || !exists("did_screen_syn_inits")
  134.     if version < 508
  135.         let did_screen_syn_inits = 1
  136.         command -nargs=+ HiLink hi link <args>
  137.     else
  138.         command -nargs=+ HiLink hi def link <args>
  139.     endif
  140.  
  141.     HiLink quakeComment    Comment
  142.     HiLink quakeTodo    Todo
  143.     HiLink quakeString    String
  144.     HiLink quakeNumber    Number
  145.     HiLink quakeOctal    Number
  146.     HiLink quakeOctalZero    Number
  147.     HiLink quakeFloat    Number
  148.     HiLink quakeOctalError    Error
  149.     HiLink quakeCommand    quakeCommands
  150.     HiLink quake1Command    quakeCommands
  151.     HiLink quake12Command    quakeCommands
  152.     HiLink quake2Command    quakeCommands
  153.     HiLink quake23Command    quakeCommands
  154.     HiLink quake3Command    quakeCommands
  155.     HiLink quakeCommands    Keyword
  156.  
  157.     delcommand HiLink
  158. endif
  159.  
  160.  
  161.  
  162. " vim: set sts=0 sw=8 ts=8:
  163.