Mercurial > vim
annotate runtime/syntax/docbk.vim @ 12485:ab40ecb0fd73 v8.0.1122
patch 8.0.1122: vimtutor.bat doesn't work well with vim.bat
commit https://github.com/vim/vim/commit/dde403c2d8f3dabe6fefa7b526958b49a8f2e6e9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 17 21:43:00 2017 +0200
patch 8.0.1122: vimtutor.bat doesn't work well with vim.bat
Problem: vimtutor.bat doesn't work well with vim.bat.
Solution: Use "call vim". (Ken Takata, closes https://github.com/vim/vim/issues/2105)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 17 Sep 2017 21:45:04 +0200 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: DocBook | |
3 " Maintainer: Devin Weaver <vim@tritarget.com> | |
3967 | 4 " Last Updated By: Shlomi Fish |
7 | 5 " URL: http://tritarget.com/pub/vim/syntax/docbk.vim |
3967 | 6 " Last Change: 2012 Nov 28 |
7 " Version: 1.2 (and modified after that) | |
7 | 8 " Thanks to Johannes Zellner <johannes@zellner.org> for the default to XML |
9 " suggestion. | |
10 | |
11 " REFERENCES: | |
12 " http://docbook.org/ | |
13 " http://www.open-oasis.org/docbook/ | |
14 " | |
15 | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3967
diff
changeset
|
16 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3967
diff
changeset
|
17 if exists("b:current_syntax") |
7 | 18 finish |
19 endif | |
20 | |
21 " Auto detect added by Bram Moolenaar | |
22 if !exists('b:docbk_type') | |
23 if expand('%:e') == "sgml" | |
24 let b:docbk_type = 'sgml' | |
25 else | |
26 let b:docbk_type = 'xml' | |
27 endif | |
28 endif | |
3967 | 29 |
30 if !exists('b:docbk_ver') | |
31 if exists('docbk_ver') | |
32 let b:docbk_ver = docbk_ver | |
33 else | |
34 let b:docbk_ver = 4 | |
35 endif | |
36 end | |
37 | |
7 | 38 if 'xml' == b:docbk_type |
352 | 39 doau Syntax xml |
7 | 40 syn cluster xmlTagHook add=docbkKeyword |
41 syn cluster xmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite | |
42 syn case match | |
43 elseif 'sgml' == b:docbk_type | |
352 | 44 doau Syntax sgml |
7 | 45 syn cluster sgmlTagHook add=docbkKeyword |
46 syn cluster sgmlRegionHook add=docbkRegion,docbkTitle,docbkRemark,docbkCite | |
47 syn case ignore | |
48 endif | |
49 | |
3967 | 50 syn keyword docbkKeyword abbrev abstract accel acronym address contained |
51 syn keyword docbkKeyword affiliation alt anchor answer appendix contained | |
52 syn keyword docbkKeyword application area areaset areaspec arg contained | |
53 syn keyword docbkKeyword article artpagenums attribution audiodata contained | |
54 syn keyword docbkKeyword audioobject author authorgroup contained | |
55 syn keyword docbkKeyword authorinitials bibliocoverage bibliodiv contained | |
56 syn keyword docbkKeyword biblioentry bibliography biblioid contained | |
57 syn keyword docbkKeyword bibliolist bibliomisc bibliomixed contained | |
58 syn keyword docbkKeyword bibliomset biblioref bibliorelation contained | |
59 syn keyword docbkKeyword biblioset bibliosource blockquote book contained | |
60 syn keyword docbkKeyword bridgehead callout calloutlist caption contained | |
61 syn keyword docbkKeyword caution chapter citation citebiblioid contained | |
62 syn keyword docbkKeyword citerefentry citetitle city classname contained | |
63 syn keyword docbkKeyword classsynopsis classsynopsisinfo cmdsynopsis contained | |
64 syn keyword docbkKeyword co code col colgroup collab colophon contained | |
65 syn keyword docbkKeyword colspec command computeroutput confdates contained | |
66 syn keyword docbkKeyword confgroup confnum confsponsor conftitle contained | |
67 syn keyword docbkKeyword constant constructorsynopsis contractnum contained | |
68 syn keyword docbkKeyword contractsponsor contrib copyright coref contained | |
69 syn keyword docbkKeyword country database date dedication contained | |
70 syn keyword docbkKeyword destructorsynopsis edition editor email contained | |
71 syn keyword docbkKeyword emphasis entry entrytbl envar epigraph contained | |
72 syn keyword docbkKeyword equation errorcode errorname errortext contained | |
73 syn keyword docbkKeyword errortype example exceptionname fax contained | |
74 syn keyword docbkKeyword fieldsynopsis figure filename firstname contained | |
75 syn keyword docbkKeyword firstterm footnote footnoteref contained | |
7 | 76 syn keyword docbkKeyword foreignphrase formalpara funcdef funcparams contained |
77 syn keyword docbkKeyword funcprototype funcsynopsis funcsynopsisinfo contained | |
3967 | 78 syn keyword docbkKeyword function glossary glossdef glossdiv contained |
79 syn keyword docbkKeyword glossentry glosslist glosssee glossseealso contained | |
80 syn keyword docbkKeyword glossterm group guibutton guiicon guilabel contained | |
7 | 81 syn keyword docbkKeyword guimenu guimenuitem guisubmenu hardware contained |
3967 | 82 syn keyword docbkKeyword holder honorific imagedata imageobject contained |
83 syn keyword docbkKeyword imageobjectco important index indexdiv contained | |
84 syn keyword docbkKeyword indexentry indexterm informalequation contained | |
85 syn keyword docbkKeyword informalexample informalfigure contained | |
86 syn keyword docbkKeyword informaltable initializer inlineequation contained | |
87 syn keyword docbkKeyword inlinemediaobject interfacename issuenum contained | |
88 syn keyword docbkKeyword itemizedlist itermset jobtitle keycap contained | |
89 syn keyword docbkKeyword keycode keycombo keysym keyword keywordset contained | |
90 syn keyword docbkKeyword label legalnotice lineage lineannotation contained | |
91 syn keyword docbkKeyword link listitem literal literallayout contained | |
92 syn keyword docbkKeyword manvolnum markup mathphrase mediaobject contained | |
93 syn keyword docbkKeyword member menuchoice methodname methodparam contained | |
94 syn keyword docbkKeyword methodsynopsis modifier mousebutton msg contained | |
95 syn keyword docbkKeyword msgaud msgentry msgexplan msginfo msglevel contained | |
96 syn keyword docbkKeyword msgmain msgorig msgrel msgset msgsub contained | |
97 syn keyword docbkKeyword msgtext note olink ooclass ooexception contained | |
98 syn keyword docbkKeyword oointerface option optional orderedlist contained | |
99 syn keyword docbkKeyword orgdiv orgname otheraddr othercredit contained | |
100 syn keyword docbkKeyword othername package pagenums para paramdef contained | |
101 syn keyword docbkKeyword parameter part partintro personblurb contained | |
102 syn keyword docbkKeyword personname phone phrase pob postcode contained | |
103 syn keyword docbkKeyword preface primary primaryie printhistory contained | |
104 syn keyword docbkKeyword procedure productname productnumber contained | |
105 syn keyword docbkKeyword programlisting programlistingco prompt contained | |
106 syn keyword docbkKeyword property pubdate publisher publishername contained | |
107 syn keyword docbkKeyword qandadiv qandaentry qandaset question quote contained | |
108 syn keyword docbkKeyword refclass refdescriptor refentry contained | |
7 | 109 syn keyword docbkKeyword refentrytitle reference refmeta refmiscinfo contained |
110 syn keyword docbkKeyword refname refnamediv refpurpose refsect1 contained | |
3967 | 111 syn keyword docbkKeyword refsect2 refsect3 refsection refsynopsisdiv contained |
112 syn keyword docbkKeyword releaseinfo remark replaceable returnvalue contained | |
113 syn keyword docbkKeyword revdescription revhistory revision contained | |
114 syn keyword docbkKeyword revnumber revremark row sbr screen screenco contained | |
115 syn keyword docbkKeyword screenshot secondary secondaryie sect1 contained | |
116 syn keyword docbkKeyword sect2 sect3 sect4 sect5 section see seealso contained | |
117 syn keyword docbkKeyword seealsoie seeie seg seglistitem contained | |
118 syn keyword docbkKeyword segmentedlist segtitle seriesvolnums set contained | |
119 syn keyword docbkKeyword setindex shortaffil shortcut sidebar contained | |
120 syn keyword docbkKeyword simpara simplelist simplemsgentry contained | |
121 syn keyword docbkKeyword simplesect spanspec state step contained | |
122 syn keyword docbkKeyword stepalternatives street subject subjectset contained | |
123 syn keyword docbkKeyword subjectterm subscript substeps subtitle contained | |
124 syn keyword docbkKeyword superscript surname symbol synopfragment contained | |
125 syn keyword docbkKeyword synopfragmentref synopsis systemitem table contained | |
126 syn keyword docbkKeyword task taskprerequisites taskrelated contained | |
127 syn keyword docbkKeyword tasksummary tbody td term termdef tertiary contained | |
128 syn keyword docbkKeyword tertiaryie textdata textobject tfoot tgroup contained | |
129 syn keyword docbkKeyword th thead tip title titleabbrev toc tocentry contained | |
130 syn keyword docbkKeyword token tr trademark type uri userinput contained | |
7 | 131 syn keyword docbkKeyword varargs variablelist varlistentry varname contained |
3967 | 132 syn keyword docbkKeyword videodata videoobject void volumenum contained |
133 syn keyword docbkKeyword warning wordasword xref year contained | |
134 | |
135 if b:docbk_ver == 4 | |
136 syn keyword docbkKeyword ackno action appendixinfo articleinfo contained | |
137 syn keyword docbkKeyword authorblurb beginpage bibliographyinfo contained | |
138 syn keyword docbkKeyword blockinfo bookinfo chapterinfo contained | |
139 syn keyword docbkKeyword collabname corpauthor corpcredit contained | |
140 syn keyword docbkKeyword corpname glossaryinfo graphic graphicco contained | |
141 syn keyword docbkKeyword highlights indexinfo inlinegraphic contained | |
142 syn keyword docbkKeyword interface invpartnumber isbn issn lot contained | |
143 syn keyword docbkKeyword lotentry medialabel mediaobjectco contained | |
144 syn keyword docbkKeyword modespec objectinfo partinfo contained | |
145 syn keyword docbkKeyword prefaceinfo pubsnumber refentryinfo contained | |
146 syn keyword docbkKeyword referenceinfo refsect1info refsect2info contained | |
147 syn keyword docbkKeyword refsect3info refsectioninfo contained | |
148 syn keyword docbkKeyword refsynopsisdivinfo screeninfo sect1info contained | |
149 syn keyword docbkKeyword sect2info sect3info sect4info sect5info contained | |
150 syn keyword docbkKeyword sectioninfo setindexinfo setinfo contained | |
151 syn keyword docbkKeyword sgmltag sidebarinfo structfield contained | |
152 syn keyword docbkKeyword structname tocback tocchap tocfront contained | |
153 syn keyword docbkKeyword toclevel1 toclevel2 toclevel3 toclevel4 contained | |
154 syn keyword docbkKeyword toclevel5 tocpart ulink contained | |
155 | |
156 else | |
157 syn keyword docbkKeyword acknowledgements annotation arc contained | |
158 syn keyword docbkKeyword constraint constraintdef cover contained | |
159 syn keyword docbkKeyword extendedlink givenname info lhs locator contained | |
160 syn keyword docbkKeyword multimediaparam nonterminal org person contained | |
161 syn keyword docbkKeyword production productionrecap contained | |
162 syn keyword docbkKeyword productionset rhs tag tocdiv topic contained | |
163 | |
164 endif | |
7 | 165 |
166 " Add special emphasis on some regions. Thanks to Rory Hunter <roryh@dcs.ed.ac.uk> for these ideas. | |
167 syn region docbkRegion start="<emphasis>"lc=10 end="</emphasis>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend | |
168 syn region docbkTitle start="<title>"lc=7 end="</title>"me=e-8 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend | |
169 syn region docbkRemark start="<remark>"lc=8 end="</remark>"me=e-9 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend | |
170 syn region docbkRemark start="<comment>"lc=9 end="</comment>"me=e-10 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend | |
171 syn region docbkCite start="<citation>"lc=10 end="</citation>"me=e-11 contains=xmlRegion,xmlEntity,sgmlRegion,sgmlEntity keepend | |
172 | |
173 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3967
diff
changeset
|
174 " Only when an item doesn't have highlighting yet |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3967
diff
changeset
|
175 hi def DocbkBold term=bold cterm=bold gui=bold |
7 | 176 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
177 hi def link docbkKeyword Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
178 hi def link docbkRegion DocbkBold |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
179 hi def link docbkTitle Title |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
180 hi def link docbkRemark Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
181 hi def link docbkCite Constant |
7 | 182 |
183 | |
184 let b:current_syntax = "docbk" | |
185 | |
186 " vim: ts=8 |