2 " Language: SGML-linuxdoc (supported by old sgmltools-1.x)
3 " (for more information, visit www.sgmltools.org)
4 " Maintainer: Nam SungHyun <namsh@kldp.org>
5 " Last Change: 2001 Apr 26
7 " For version 5.x: Clear all syntax items
8 " For version 6.x: Quit when a syntax file was already loaded
11 elseif exists("b:current_syntax")
18 syn region sgmllnxEndTag start=+</+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError
19 syn region sgmllnxTag start=+<[^/]+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError
20 syn match sgmllnxTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=sgmllnxTagName
21 syn match sgmllnxTagN contained +</\s*[-a-zA-Z0-9]\++ms=s+2 contains=sgmllnxTagName
23 syn region sgmllnxTag2 start=+<\s*[a-zA-Z]\+/+ keepend end=+/+ contains=sgmllnxTagN2
24 syn match sgmllnxTagN2 contained +/.*/+ms=s+1,me=e-1
26 syn region sgmllnxSpecial oneline start="&" end=";"
29 syn keyword sgmllnxTagName contained article author date toc title sect verb
30 syn keyword sgmllnxTagName contained abstract tscreen p itemize item enum
31 syn keyword sgmllnxTagName contained descrip quote htmlurl code ref
32 syn keyword sgmllnxTagName contained tt tag bf
33 syn match sgmllnxTagName contained "sect\d\+"
36 syn region sgmllnxComment start=+<!--+ end=+-->+
37 syn region sgmllnxDocType start=+<!doctype+ end=+>+
39 " Define the default highlighting.
40 " For version 5.7 and earlier: only when not done already
41 " For version 5.8 and later: only when an item doesn't have highlighting yet
42 if version >= 508 || !exists("did_sgmllnx_syn_inits")
44 let did_sgmllnx_syn_inits = 1
45 command -nargs=+ HiLink hi link <args>
47 command -nargs=+ HiLink hi def link <args>
50 HiLink sgmllnxTag2 Function
51 HiLink sgmllnxTagN2 Function
52 HiLink sgmllnxTag Special
53 HiLink sgmllnxEndTag Special
54 HiLink sgmllnxParen Special
55 HiLink sgmllnxEntity Type
56 HiLink sgmllnxDocEnt Type
57 HiLink sgmllnxTagName Statement
58 HiLink sgmllnxComment Comment
59 HiLink sgmllnxSpecial Special
60 HiLink sgmllnxDocType PreProc
61 HiLink sgmllnxTagError Error
66 let b:current_syntax = "sgmllnx"
68 " vim:set tw=78 ts=8 sts=2 sw=2 noet: