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 / sgmllnx.vim < prev    next >
Encoding:
Text File  |  1999-09-25  |  1.9 KB  |  55 lines  |  [TEXT/VIM!]

  1. " Vim syntax file
  2. " Language:    SGML-linuxdoc (supported by old sgmltools-1.x)
  3. "        (for more information, visit www.sgmltools.org)
  4. " Maintainer:    Sung-Hyun Nam <namsh@kldp.org>
  5. "        If you want to enhance and maintain, You can remove my name
  6. "        and insert yours.
  7. " Last change:    1999 Sep 18
  8.  
  9. " Remove any old syntax stuff hanging around
  10. syn clear
  11. syn case ignore
  12.  
  13. " tags
  14. syn region sgmllnxEndTag    start=+</+    end=+>+    contains=sgmllnxTagN,sgmllnxTagError
  15. syn region sgmllnxTag    start=+<[^/]+ end=+>+    contains=sgmllnxTagN,sgmllnxTagError
  16. syn match  sgmllnxTagN    contained +<\s*[-a-zA-Z0-9]\++ms=s+1    contains=sgmllnxTagName
  17. syn match  sgmllnxTagN    contained +</\s*[-a-zA-Z0-9]\++ms=s+2    contains=sgmllnxTagName
  18.  
  19. syn region sgmllnxTag2    start=+<\s*[a-zA-Z]\+/+ keepend end=+/+    contains=sgmllnxTagN2
  20. syn match  sgmllnxTagN2    contained +/.*/+ms=s+1,me=e-1
  21.  
  22. syn region sgmllnxSpecial    oneline start="&" end=";"
  23.  
  24. " tag names
  25. syn keyword sgmllnxTagName contained article author date toc title sect verb
  26. syn keyword sgmllnxTagName contained abstract tscreen p itemize item enum
  27. syn keyword sgmllnxTagName contained descrip quote htmlurl code ref
  28. syn keyword sgmllnxTagName contained tt tag bf
  29. syn match   sgmllnxTagName contained "sect\d\+"
  30.  
  31. " Comments
  32. syn region sgmllnxComment start=+<!--+ end=+-->+
  33. syn region sgmllnxDocType start=+<!doctype+ end=+>+
  34.  
  35. if !exists("did_sgmllnx_syntax_inits")
  36.   let did_sgmllnx_syntax_inits = 1
  37.   " The default methods for highlighting.  Can be overridden later
  38.   hi link sgmllnxTag2    Function
  39.   hi link sgmllnxTagN2    Function
  40.   hi link sgmllnxTag    Special
  41.   hi link sgmllnxEndTag    Special
  42.   hi link sgmllnxParen    Special
  43.   hi link sgmllnxEntity    Type
  44.   hi link sgmllnxDocEnt    Type
  45.   hi link sgmllnxTagName    Statement
  46.   hi link sgmllnxComment    Comment
  47.   hi link sgmllnxSpecial    Special
  48.   hi link sgmllnxDocType   PreProc
  49.   hi link sgmllnxTagError    Error
  50. endif
  51.  
  52. let b:current_syntax = "sgmllnx"
  53.  
  54. " vim:set tw=78 ts=8 sts=8 sw=8 noet com=nb\:":
  55.