annotate runtime/syntax/docbk.vim @ 829:dc8197342755 v7.0d04

updated for version 7.0d04
author vimboss
date Fri, 14 Apr 2006 20:42:25 +0000
parents e5f0dd64a9c6
children 7bc41231fbc7
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: DocBook
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Devin Weaver <vim@tritarget.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://tritarget.com/pub/vim/syntax/docbk.vim
352
e5f0dd64a9c6 updated for version 7.0091
vimboss
parents: 7
diff changeset
5 " Last Change: $Date$
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Version: $Revision$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Thanks to Johannes Zellner <johannes@zellner.org> for the default to XML
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " suggestion.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " REFERENCES:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " http://docbook.org/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " http://www.open-oasis.org/docbook/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Auto detect added by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 if !exists('b:docbk_type')
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 if expand('%:e') == "sgml"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 let b:docbk_type = 'sgml'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 let b:docbk_type = 'xml'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if 'xml' == b:docbk_type
352
e5f0dd64a9c6 updated for version 7.0091
vimboss
parents: 7
diff changeset
32 doau Syntax xml
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn cluster xmlTagHook add=docbkKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn cluster xmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 elseif 'sgml' == b:docbk_type
352
e5f0dd64a9c6 updated for version 7.0091
vimboss
parents: 7
diff changeset
37 doau Syntax sgml
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn cluster sgmlTagHook add=docbkKeyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn cluster sgmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " <comment> has been removed and replace with <remark> in DocBook 4.0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " <comment> kept for backwards compatability.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword docbkKeyword abbrev abstract accel ackno acronym action contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword docbkKeyword address affiliation alt anchor answer appendix contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword docbkKeyword application area areaset areaspec arg artheader contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword docbkKeyword article articleinfo artpagenums attribution audiodata contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword docbkKeyword audioobject author authorblurb authorgroup contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword docbkKeyword authorinitials beginpage bibliodiv biblioentry contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword docbkKeyword bibliography bibliomisc bibliomixed bibliomset contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword docbkKeyword biblioset blockquote book bookbiblio bookinfo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword docbkKeyword bridgehead callout calloutlist caption caution contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword docbkKeyword chapter citation citerefentry citetitle city contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword docbkKeyword classname cmdsynopsis co collab collabname contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword docbkKeyword colophon colspec command comment computeroutput contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword docbkKeyword confdates confgroup confnum confsponsor conftitle contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword docbkKeyword constant contractnum contractsponsor contrib contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword docbkKeyword copyright corpauthor corpname country database contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword docbkKeyword date dedication docinfo edition editor email contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword docbkKeyword emphasis entry entrytbl envar epigraph equation contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword docbkKeyword errorcode errorname errortype example fax figure contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword docbkKeyword filename firstname firstterm footnote footnoteref contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword docbkKeyword function glossary glossdef glossdiv glossentry contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword docbkKeyword glosslist glosssee glossseealso glossterm graphic contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword docbkKeyword graphicco group guibutton guiicon guilabel contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword docbkKeyword highlights holder honorific imagedata imageobject contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword docbkKeyword imageobjectco important index indexdiv indexentry contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword docbkKeyword indexterm informalequation informalexample contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword docbkKeyword informalfigure informaltable inlineequation contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword docbkKeyword inlinegraphic inlinemediaobject interface contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword docbkKeyword interfacedefinition invpartnumber isbn issn contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword docbkKeyword issuenum itemizedlist itermset jobtitle keycap contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword docbkKeyword keycode keycombo keysym keyword keywordset label contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword docbkKeyword legalnotice lineage lineannotation link listitem contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword docbkKeyword literal literallayout lot lotentry manvolnum contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword docbkKeyword markup medialabel mediaobject mediaobjectco contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword docbkKeyword member menuchoice modespec mousebutton msg msgaud contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword docbkKeyword msgentry msgexplan msginfo msglevel msgmain contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword docbkKeyword msgorig msgrel msgset msgsub msgtext note contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword docbkKeyword objectinfo olink option optional orderedlist contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword docbkKeyword orgdiv orgname otheraddr othercredit othername contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword docbkKeyword pagenums para paramdef parameter part partintro contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword docbkKeyword phone phrase pob postcode preface primary contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword docbkKeyword primaryie printhistory procedure productname contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword docbkKeyword productnumber programlisting programlistingco contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn keyword docbkKeyword prompt property pubdate publisher publishername contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword docbkKeyword pubsnumber qandadiv qandaentry qandaset question contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword docbkKeyword quote refclass refdescriptor refentry contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn keyword docbkKeyword refsect1info refsect2 refsect2info refsect3 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword docbkKeyword refsect3info refsynopsisdiv refsynopsisdivinfo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword docbkKeyword releaseinfo remark replaceable returnvalue revhistory contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword docbkKeyword revision revnumber revremark row sbr screen contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword docbkKeyword screenco screeninfo screenshot secondary contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword docbkKeyword secondaryie sect1 sect1info sect2 sect2info sect3 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword docbkKeyword sect3info sect4 sect4info sect5 sect5info section contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn keyword docbkKeyword sectioninfo see seealso seealsoie seeie seg contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn keyword docbkKeyword seglistitem segmentedlist segtitle seriesinfo contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn keyword docbkKeyword seriesvolnums set setindex setinfo sgmltag contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn keyword docbkKeyword shortaffil shortcut sidebar simpara simplelist contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword docbkKeyword simplesect spanspec state step street structfield contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn keyword docbkKeyword structname subject subjectset subjectterm contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn keyword docbkKeyword subscript substeps subtitle superscript surname contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword docbkKeyword symbol synopfragment synopfragmentref synopsis contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword docbkKeyword systemitem table tbody term tertiary tertiaryie contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn keyword docbkKeyword textobject tfoot tgroup thead tip title contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syn keyword docbkKeyword titleabbrev toc tocback tocchap tocentry tocfront contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 toclevel5 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 syn keyword docbkKeyword tocpart token trademark type ulink userinput contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn keyword docbkKeyword varargs variablelist varlistentry varname contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 syn keyword docbkKeyword videodata videoobject void volumenum warning contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 syn keyword docbkKeyword wordasword xref year contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " Add special emphasis on some regions. Thanks to Rory Hunter <roryh@dcs.ed.ac.uk> for these ideas.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn region docbkRegion start="<emphasis>"lc=10 end="</emphasis>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 syn region docbkTitle start="<title>"lc=7 end="</title>"me=e-8 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn region docbkRemark start="<remark>"lc=8 end="</remark>"me=e-9 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 if version >= 508 || !exists("did_docbk_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 let did_docbk_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 hi DocbkBold term=bold cterm=bold gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 hi def DocbkBold term=bold cterm=bold gui=bold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 HiLink docbkKeyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140 HiLink docbkRegion DocbkBold
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 HiLink docbkTitle Title
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 HiLink docbkRemark Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 HiLink docbkCite Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 let b:current_syntax = "docbk"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 " vim: ts=8