1" Vim syntax file 2" Language: SGML-linuxdoc (supported by old sgmltools-1.x) 3" Maintainer: SungHyun Nam <[email protected]> 4" Last Change: 2013 May 13 5 6" quit when a syntax file was already loaded 7if exists("b:current_syntax") 8 finish 9endif 10 11syn case ignore 12 13" tags 14syn region sgmllnxEndTag start=+</+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError 15syn region sgmllnxTag start=+<[^/]+ end=+>+ contains=sgmllnxTagN,sgmllnxTagError 16syn match sgmllnxTagN contained +<\s*[-a-zA-Z0-9]\++ms=s+1 contains=sgmllnxTagName 17syn match sgmllnxTagN contained +</\s*[-a-zA-Z0-9]\++ms=s+2 contains=sgmllnxTagName 18 19syn region sgmllnxTag2 start=+<\s*[a-zA-Z]\+/+ keepend end=+/+ contains=sgmllnxTagN2 20syn match sgmllnxTagN2 contained +/.*/+ms=s+1,me=e-1 21 22syn region sgmllnxSpecial oneline start="&" end=";" 23 24" tag names 25syn keyword sgmllnxTagName contained article author date toc title sect verb 26syn keyword sgmllnxTagName contained abstract tscreen p itemize item enum 27syn keyword sgmllnxTagName contained descrip quote htmlurl code ref 28syn keyword sgmllnxTagName contained tt tag bf it url 29syn match sgmllnxTagName contained "sect\d\+" 30 31" Comments 32syn region sgmllnxComment start=+<!--+ end=+-->+ 33syn region sgmllnxDocType start=+<!doctype+ end=+>+ 34 35" Define the default highlighting. 36" Only when an item doesn't have highlighting yet 37 38hi def link sgmllnxTag2 Function 39hi def link sgmllnxTagN2 Function 40hi def link sgmllnxTag Special 41hi def link sgmllnxEndTag Special 42hi def link sgmllnxParen Special 43hi def link sgmllnxEntity Type 44hi def link sgmllnxDocEnt Type 45hi def link sgmllnxTagName Statement 46hi def link sgmllnxComment Comment 47hi def link sgmllnxSpecial Special 48hi def link sgmllnxDocType PreProc 49hi def link sgmllnxTagError Error 50 51 52let b:current_syntax = "sgmllnx" 53 54" vim:set tw=78 ts=8 sts=2 sw=2 noet: 55