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 / mac / vim55rt.sit / runtime / syntax / lout.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  3.5 KB  |  110 lines  |  [TEXT/VIM!]

  1. " Vim syntax file
  2. " Language   : Lout
  3. " Maintainer : Christian V. J. Bruessow <cvjb@bigfoot.de>
  4. " Last change: Fre 18 Jun 1999 13:42:06 MEST
  5.  
  6. " Lout: Basser Lout document formatting system.
  7.  
  8. " Remove any old syntax stuff hanging around
  9. syn clear
  10.  
  11. " Lout is case sensitive
  12. syn case match
  13.  
  14. " Synchronization
  15. syn sync lines=1000
  16. set iskeyword=@,48-57,.,@-@,_,192-255
  17.  
  18. " Some special keywords
  19. syn keyword loutTodo contained TODO lout Lout LOUT
  20. syn keyword loutDefine def macro
  21.  
  22. " Some big structures
  23. syn keyword loutKeyword @Begin @End @Figure @Tab
  24. syn keyword loutKeyword @Book @Doc @Document @Report
  25. syn keyword loutKeyword @Introduction @Abstract @Appendix
  26. syn keyword loutKeyword @Chapter @Section @BeginSections @EndSections
  27.  
  28. " All kind of Lout keywords
  29. syn match loutFunction '\<@[^ \t{}]\+\>'
  30.  
  31. " Braces -- Don`t edit these lines!
  32. syn match loutMBraces '[{}]'
  33. syn match loutIBraces '[{}]'
  34. syn match loutBBrace '[{}]'
  35. syn match loutBIBraces '[{}]'
  36. syn match loutHeads '[{}]'
  37.  
  38. " Unmatched braces.
  39. syn match loutBraceError '}'
  40.  
  41. " End of multi-line definitions, like @Document, @Report and @Book.
  42. syn match loutEOmlDef '^//$'
  43.  
  44. " Grouping of parameters and objects.
  45. syn region loutObject transparent matchgroup=Delimiter start='{' matchgroup=Delimiter end='}' contains=ALLBUT,loutBraceError
  46.  
  47. " The NULL object has a special meaning
  48. syn keyword loutNULL {}
  49.  
  50. " Comments
  51. syn region loutComment start='\#' end='$' contains=loutTodo
  52.  
  53. " Double quotes
  54. syn region loutSpecial start=+"+ skip=+\\\\\|\\"+ end=+"+
  55.  
  56. " ISO-LATIN-1 characters created with @Char, or Adobe symbols
  57. " created with @Sym
  58. syn match loutSymbols '@\(\(Char\)\|\(Sym\)\)\s\+[A-Za-z]\+'
  59.  
  60. " Include files
  61. syn match loutInclude '@IncludeGraphic\s\+\k\+'
  62. syn region loutInclude start='@\(\(SysInclude\)\|\(IncludeGraphic\)\|\(Include\)\)\s*{' end='}'
  63.  
  64. " Tags
  65. syn match loutTag '@\(\(Tag\)\|\(PageMark\)\|\(PageOf\)\|\(NumberOf\)\)\s\+\k\+'
  66. syn region loutTag start='@Tag\s*{' end='}'
  67.  
  68. " Equations
  69. syn match loutMath '@Eq\s\+\k\+'
  70. syn region loutMath matchgroup=loutMBraces start='@Eq\s*{' matchgroup=loutMBraces end='}' contains=ALLBUT,loutBraceError
  71. "
  72. " Fonts
  73. syn match loutItalic '@I\s\+\k\+'
  74. syn region loutItalic matchgroup=loutIBraces start='@I\s*{' matchgroup=loutIBraces end='}' contains=ALLBUT,loutBraceError
  75. syn match loutBold '@B\s\+\k\+'
  76. syn region loutBold matchgroup=loutBBraces start='@B\s*{' matchgroup=loutBBraces end='}' contains=ALLBUT,loutBraceError
  77. syn match loutBoldItalic '@BI\s\+\k\+'
  78. syn region loutBoldItalic matchgroup=loutBIBraces start='@BI\s*{' matchgroup=loutBIBraces end='}' contains=ALLBUT,loutBraceError
  79. syn region loutHeadings matchgroup=loutHeads start='@\(\(Title\)\|\(Caption\)\)\s*{' matchgroup=loutHeads end='}' contains=ALLBUT,loutBraceError
  80.  
  81. if !exists("did_lout_syntax")
  82.     let did_lout_syntax = 1
  83.     " The default methods for highlighting. Can be overrriden later.
  84.     hi link loutTodo Todo
  85.     hi link loutDefine Define
  86.     hi link loutEOmlDef Define
  87.     hi link loutFunction Function
  88.     hi link loutBraceError Error
  89.     hi link loutNULL Special
  90.     hi link loutComment Comment
  91.     hi link loutSpecial Special
  92.     hi link loutSymbols Character
  93.     hi link loutInclude Include
  94.     hi link loutKeyword Keyword
  95.     hi link loutTag Tag
  96.     hi link loutMath Number
  97.     hi link loutMBraces loutMath
  98.  
  99.     hi loutItalic term=italic cterm=italic gui=italic
  100.     hi link loutIBraces loutItalic
  101.     hi loutBold term=bold cterm=bold gui=bold
  102.     hi link loutBBraces loutBold
  103.     hi loutBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
  104.     hi link loutBIBraces loutBoldItalic
  105.     hi loutHeadings term=bold cterm=bold guifg=indianred
  106.     hi link loutHeads loutHeadings
  107. endif
  108.  
  109. let b:current_syntax = "lout"
  110.