limbo.vim 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. " Vim syntax file
  2. " Language: Limbo
  3. " Maintainer: Alex Efros <powerman-asdf@ya.ru>
  4. " Version: 0.5
  5. " Updated: 2008-10-17
  6. " Remove any old syntax stuff that was loaded (5.x) or quit when a syntax file
  7. " was already loaded (6.x).
  8. if version < 600
  9. syntax clear
  10. elseif exists("b:current_syntax")
  11. finish
  12. endif
  13. syn keyword lTodo TODO TBD FIXME XXX BUG contained
  14. syn match lComment "#.*" contains=@Spell,lTodo
  15. syn keyword lInclude include
  16. syn match lSpecialChar display contained "\\\(u\x\{4}\|['\"\\tnrbavf0]\)"
  17. syn match lSpecialError display contained "\(\\[^'\"\\tnrbavf0u]\+\|\\u.\{0,3}\X\)"
  18. syn match lCharError display contained "\([^\\'][^']\+\|\\[^'][^']\+\)"
  19. syn region lString start=+"+ end=+"+ skip=+\\"+ contains=@Spell,lSpecialChar,lSpecialError
  20. syn region lCharacter start=+'+ end=+'+ skip=+\\'+ contains=lSpecialChar,lSpecialError,lCharError
  21. syn keyword lSpecial nil iota
  22. syn keyword lFunction tl hd len tagof
  23. syn match lFunction "<-=\?"
  24. syn keyword lStatement alt break continue exit return spawn implement import load raise
  25. syn keyword lRepeat for while do
  26. syn keyword lConditional if else case
  27. syn keyword lType array big byte chan con int list real string fn fixed
  28. syn keyword lStructure adt pick module
  29. syn keyword lStorageClass ref self cyclic type of
  30. syn keyword lDelimiter or to
  31. syn match lDelimiter "=>\|->\|\.\|::"
  32. if version >= 508 || !exists("did_icgiperl_syn_inits")
  33. if version < 508
  34. let did_icgiperl_syn_inits = 1
  35. command -nargs=+ HiLink hi link <args>
  36. else
  37. command -nargs=+ HiLink hi def link <args>
  38. endif
  39. " Comment
  40. HiLink lComment Comment
  41. " PreProc (Include, PreCondit)
  42. HiLink lInclude Include
  43. " Constant (String, Character, Number, Boolean, Float)
  44. HiLink lString String
  45. HiLink lCharacter Character
  46. " Special (Tag, SpecialChar, SpecialComment, Debug)
  47. HiLink lSpecial Special
  48. HiLink lSpecialChar SpecialChar
  49. " Identifier (Function)
  50. HiLink lFunction Function
  51. " Statement (Conditional, Repeat, Label, Operator, Keyword, Exception)
  52. HiLink lStatement Statement
  53. HiLink lRepeat Repeat
  54. HiLink lConditional Conditional
  55. " Type (StorageClass, Structure, Typedef)
  56. HiLink lType Type
  57. HiLink lStructure Structure
  58. HiLink lStorageClass StorageClass
  59. " Error
  60. HiLink lSpecialError Error
  61. HiLink lCharError Error
  62. " Todo
  63. HiLink lTodo Todo
  64. " Delimiter
  65. HiLink lDelimiter Delimiter
  66. delcommand HiLink
  67. endif
  68. let b:current_syntax = "limbo"