neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

sgmllnx.vim (1851B)


      1 " Vim syntax file
      2 " Language:	SGML-linuxdoc (supported by old sgmltools-1.x)
      3 " Maintainer:	SungHyun Nam <goweol@gmail.com>
      4 " Last Change:	2013 May 13
      5 
      6 " quit when a syntax file was already loaded
      7 if exists("b:current_syntax")
      8  finish
      9 endif
     10 
     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 it url
     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 " Define the default highlighting.
     36 " Only when an item doesn't have highlighting yet
     37 
     38 hi def link sgmllnxTag2	    Function
     39 hi def link sgmllnxTagN2	    Function
     40 hi def link sgmllnxTag	    Special
     41 hi def link sgmllnxEndTag	    Special
     42 hi def link sgmllnxParen	    Special
     43 hi def link sgmllnxEntity	    Type
     44 hi def link sgmllnxDocEnt	    Type
     45 hi def link sgmllnxTagName	    Statement
     46 hi def link sgmllnxComment	    Comment
     47 hi def link sgmllnxSpecial	    Special
     48 hi def link sgmllnxDocType	    PreProc
     49 hi def link sgmllnxTagError    Error
     50 
     51 
     52 let b:current_syntax = "sgmllnx"
     53 
     54 " vim:set tw=78 ts=8 sts=2 sw=2 noet: