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 / aap.vim < prev    next >
Encoding:
Text File  |  2003-05-16  |  4.7 KB  |  137 lines

  1. " Vim syntax file
  2. " Language:    A-A-P recipe
  3. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  4. " Last Change:    2003 May 16
  5.  
  6. " Quit when a syntax file was already loaded
  7. if exists("b:current_syntax")
  8.     finish
  9. endif
  10.  
  11. let s:cpo_save = &cpo
  12. set cpo&vim
  13.  
  14. syn match    aapComment '#.*' contains=aapTodo
  15. syn match    aapSpecial '$#'
  16. syn match    aapSpecial '$\$'
  17. syn keyword    aapTodo contained TODO Todo
  18. syn match    aapString +'[^']\{-}'+
  19. syn match    aapString +"[^"]\{-}"+
  20.  
  21. syn match    aapCommand '^\s*:action\>'
  22. syn match    aapCommand '^\s*:add\>'
  23. syn match    aapCommand '^\s*:addall\>'
  24. syn match    aapCommand '^\s*:asroot\>'
  25. syn match    aapCommand '^\s*:assertpkg\>'
  26. syn match    aapCommand '^\s*:attr\>'
  27. syn match    aapCommand '^\s*:attribute\>'
  28. syn match    aapCommand '^\s*:autodepend\>'
  29. syn match    aapCommand '^\s*:buildcheck\>'
  30. syn match    aapCommand '^\s*:cd\>'
  31. syn match    aapCommand '^\s*:checkin\>'
  32. syn match    aapCommand '^\s*:checkout\>'
  33. syn match    aapCommand '^\s*:chdir\>'
  34. syn match    aapCommand '^\s*:child\>'
  35. syn match    aapCommand '^\s*:chmod\>'
  36. syn match    aapCommand '^\s*:commit\>'
  37. syn match    aapCommand '^\s*:commitall\>'
  38. syn match    aapCommand '^\s*:copy\>'
  39. syn match    aapCommand '^\s*:del\>'
  40. syn match    aapCommand '^\s*:deldir\>'
  41. syn match    aapCommand '^\s*:delete\>'
  42. syn match    aapCommand '^\s*:delrule\>'
  43. syn match    aapCommand '^\s*:dll\>'
  44. syn match    aapCommand '^\s*:do\>'
  45. syn match    aapCommand '^\s*:error\>'
  46. syn match    aapCommand '^\s*:execute\>'
  47. syn match    aapCommand '^\s*:exit\>'
  48. syn match    aapCommand '^\s*:export\>'
  49. syn match    aapCommand '^\s*:fetch\>'
  50. syn match    aapCommand '^\s*:fetchall\>'
  51. syn match    aapCommand '^\s*:filetype\>'
  52. syn match    aapCommand '^\s*:global\>'
  53. syn match    aapCommand '^\s*:include\>'
  54. syn match    aapCommand '^\s*:lib\>'
  55. syn match    aapCommand '^\s*:local\>'
  56. syn match    aapCommand '^\s*:mkdir\>'
  57. syn match    aapCommand '^\s*:mkdownload\>'
  58. syn match    aapCommand '^\s*:move\>'
  59. syn match    aapCommand '^\s*:pass\>'
  60. syn match    aapCommand '^\s*:popdir\>'
  61. syn match    aapCommand '^\s*:program\>'
  62. syn match    aapCommand '^\s*:progsearch\>'
  63. syn match    aapCommand '^\s*:publish\>'
  64. syn match    aapCommand '^\s*:publishall\>'
  65. syn match    aapCommand '^\s*:pushdir\>'
  66. syn match    aapCommand '^\s*:quit\>'
  67. syn match    aapCommand '^\s*:recipe\>'
  68. syn match    aapCommand '^\s*:refresh\>'
  69. syn match    aapCommand '^\s*:remove\>'
  70. syn match    aapCommand '^\s*:removeall\>'
  71. syn match    aapCommand '^\s*:require\>'
  72. syn match    aapCommand '^\s*:revise\>'
  73. syn match    aapCommand '^\s*:reviseall\>'
  74. syn match    aapCommand '^\s*:route\>'
  75. syn match    aapCommand '^\s*:rule\>'
  76. syn match    aapCommand '^\s*:start\>'
  77. syn match    aapCommand '^\s*:symlink\>'
  78. syn match    aapCommand '^\s*:sys\>'
  79. syn match    aapCommand '^\s*:syspath\>'
  80. syn match    aapCommand '^\s*:system\>'
  81. syn match    aapCommand '^\s*:tag\>'
  82. syn match    aapCommand '^\s*:tagall\>'
  83. syn match    aapCommand '^\s*:touch\>'
  84. syn match    aapCommand '^\s*:tree\>'
  85. syn match    aapCommand '^\s*:unlock\>'
  86. syn match    aapCommand '^\s*:update\>'
  87. syn match    aapCommand '^\s*:usetool\>'
  88. syn match    aapCommand '^\s*:variant\>'
  89. syn match    aapCommand '^\s*:verscont\>'
  90.  
  91. syn match    aapCommand '^\s*:print\>' nextgroup=aapPipeEnd
  92. syn match    aapPipeCmd '\s*:print\>' nextgroup=aapPipeEnd contained
  93. syn match    aapCommand '^\s*:cat\>' nextgroup=aapPipeEnd
  94. syn match    aapPipeCmd '\s*:cat\>' nextgroup=aapPipeEnd contained
  95. syn match    aapCommand '^\s*:syseval\>' nextgroup=aapPipeEnd
  96. syn match    aapPipeCmd '\s*:syseval\>' nextgroup=aapPipeEnd contained
  97. syn match    aapPipeCmd '\s*:assign\>' contained
  98. syn match    aapCommand '^\s*:eval\>' nextgroup=aapPipeEnd
  99. syn match    aapPipeCmd '\s*:eval\>' nextgroup=aapPipeEnd contained
  100. syn match    aapPipeCmd '\s*:tee\>' nextgroup=aapPipeEnd contained
  101. syn match    aapPipeEnd '[^|]*|' nextgroup=aapPipeCmd contained
  102.  
  103. syn include @aapPythonScript syntax/python.vim
  104. "
  105. " A Python line starts with @.  Can be continued with a trailing backslash.
  106. syn region aapPythonRegion start="\s*@" skip='\\$' end=+$+ contains=@aapPythonScript keepend
  107. "
  108. " A Python block starts with ":python" and continues so long as the indent is
  109. " bigger.
  110. syn region aapPythonRegion matchgroup=aapCommand start="\z(\s*\):python" skip='\n\z1\s\|\n\s*\n' end=+$+ contains=@aapPythonScript
  111.  
  112. " A Python expression is enclosed in backticks.
  113. syn region aapPythonRegion start="`" skip="``" end="`" contains=@aapPythonScript
  114.  
  115. " A heredoc assignment.
  116. syn region aapHeredoc start="^\s*\k\+\s*$\=+\=?\=<<\s*\z(\S*\)"hs=e+1 end="^\s*\z1\s*$"he=s-1
  117.  
  118. " Syncing is needed for ":python" and "VAR << EOF".  Don't use Python syncing
  119. syn sync clear
  120. syn sync fromstart
  121.  
  122. " The default highlighting.
  123. hi def link aapTodo        Todo
  124. hi def link aapString        String
  125. hi def link aapComment        Comment
  126. hi def link aapSpecial        Special
  127. hi def link aapPipeCmd        aapCommand
  128. hi def link aapCommand        Statement
  129. hi def link aapHeredoc        Constant
  130.  
  131. let b:current_syntax = "aap"
  132.  
  133. let &cpo = s:cpo_save
  134. unlet s:cpo_save
  135.  
  136. " vim: ts=8
  137.