annotate runtime/syntax/rhelp.vim @ 2152:b9e314fe473f

Updated runtime files.
author Bram Moolenaar <bram@zimbu.org>
date Fri, 14 May 2010 23:24:24 +0200
parents 7bc41231fbc7
children 916c90b37ea9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
1 " Vim syntax file
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
2 " Language: R Help File
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
3 " Maintainer: Johannes Ranke <jranke@uni-bremen.de>
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
4 " Last Change: 2010 Apr 22
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
5 " Version: 0.7.3
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
6 " SVN: $Id: rhelp.vim 88 2010-04-22 19:37:09Z ranke $
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
7 " Remarks: - Now includes R syntax highlighting in the appropriate
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
8 " sections if an r.vim file is in the same directory or in the
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
9 " default debian location.
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
10 " - There is no Latex markup in equations
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
11 " - Thanks to Will Gray for finding and fixing a bug
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
12 " - No support for \if, \ifelse and \out as I don't understand
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
13 " them and have no examples at hand (help welcome).
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
14 " - No support for \var tag within quoted string (dito)
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
15
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
16 " Version Clears: {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
17 " For version 5.x: Clear all syntax items
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 714
diff changeset
18 " For version 6.x and 7.x: Quit when a syntax file was already loaded
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
19 if version < 600
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
20 syntax clear
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
21 elseif exists("b:current_syntax")
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
22 finish
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
23 endif
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
24
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
25 syn case match
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
26
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
27 " R help identifiers {{{
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
28 syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
29 syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
30 syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}"
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
31 syn region rhelpIdentifier matchgroup=rhelpSection start="\\item{" end="}" contained contains=rhelpDots
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
32 syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end=/}/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
33
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
34 " Highlighting of R code using an existing r.vim syntax file if available {{{1
827
fd1b3406fd1c updated for version 7.0d02
vimboss
parents: 819
diff changeset
35 syn include @R syntax/r.vim
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
36 syn match rhelpDots "\\dots" containedin=@R
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
37 syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpSection
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
38 syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpIdentifier,rhelpS4method
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
39 syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end=/}/ contains=@R
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
40 syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end=/}/ contains=@R contained
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 714
diff changeset
41 syn region rhelpRcode matchgroup=Delimiter start="\\code{" matchgroup=Delimiter transparent end=/}/ contains=@R,rhelpLink contained
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
42 syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=/)/ contains=@R,rhelpDots contained
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
43 syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end=/}/ contains=@R
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
44
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
45 " Strings {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
46 syn region rhelpString start=/"/ end=/"/
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
47
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 714
diff changeset
48 " Special characters ( \$ \& \% \# \{ \} \_) {{{1
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
49 syn match rhelpSpecialChar "\\[$&%#{}_]"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
50
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
51 " Special Delimiters {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
52 syn match rhelpDelimiter "\\cr"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
53 syn match rhelpDelimiter "\\tab "
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
54
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
55 " Keywords {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
56 syn match rhelpKeyword "\\R"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
57 syn match rhelpKeyword "\\ldots"
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
58 syn match rhelpKeyword "--"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
59 syn match rhelpKeyword "---"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
60 syn match rhelpKeyword "<"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
61 syn match rhelpKeyword ">"
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
62 syn match rhelpKeyword "\\ge"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
63 syn match rhelpKeyword "\\le"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
64 syn match rhelpKeyword "\\alpha"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
65 syn match rhelpKeyword "\\beta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
66 syn match rhelpKeyword "\\gamma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
67 syn match rhelpKeyword "\\delta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
68 syn match rhelpKeyword "\\epsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
69 syn match rhelpKeyword "\\zeta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
70 syn match rhelpKeyword "\\eta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
71 syn match rhelpKeyword "\\theta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
72 syn match rhelpKeyword "\\iota"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
73 syn match rhelpKeyword "\\kappa"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
74 syn match rhelpKeyword "\\lambda"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
75 syn match rhelpKeyword "\\mu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
76 syn match rhelpKeyword "\\nu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
77 syn match rhelpKeyword "\\xi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
78 syn match rhelpKeyword "\\omicron"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
79 syn match rhelpKeyword "\\pi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
80 syn match rhelpKeyword "\\rho"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
81 syn match rhelpKeyword "\\sigma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
82 syn match rhelpKeyword "\\tau"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
83 syn match rhelpKeyword "\\upsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
84 syn match rhelpKeyword "\\phi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
85 syn match rhelpKeyword "\\chi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
86 syn match rhelpKeyword "\\psi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
87 syn match rhelpKeyword "\\omega"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
88 syn match rhelpKeyword "\\Alpha"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
89 syn match rhelpKeyword "\\Beta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
90 syn match rhelpKeyword "\\Gamma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
91 syn match rhelpKeyword "\\Delta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
92 syn match rhelpKeyword "\\Epsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
93 syn match rhelpKeyword "\\Zeta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
94 syn match rhelpKeyword "\\Eta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
95 syn match rhelpKeyword "\\Theta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
96 syn match rhelpKeyword "\\Iota"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
97 syn match rhelpKeyword "\\Kappa"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
98 syn match rhelpKeyword "\\Lambda"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
99 syn match rhelpKeyword "\\Mu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
100 syn match rhelpKeyword "\\Nu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
101 syn match rhelpKeyword "\\Xi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
102 syn match rhelpKeyword "\\Omicron"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
103 syn match rhelpKeyword "\\Pi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
104 syn match rhelpKeyword "\\Rho"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
105 syn match rhelpKeyword "\\Sigma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
106 syn match rhelpKeyword "\\Tau"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
107 syn match rhelpKeyword "\\Upsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
108 syn match rhelpKeyword "\\Phi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
109 syn match rhelpKeyword "\\Chi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
110 syn match rhelpKeyword "\\Psi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
111 syn match rhelpKeyword "\\Omega"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
112
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
113 " Links {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
114 syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
115 syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
116 syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
117
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
118 " Type Styles {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
119 syn match rhelpType "\\emph\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
120 syn match rhelpType "\\strong\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
121 syn match rhelpType "\\bold\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
122 syn match rhelpType "\\sQuote\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
123 syn match rhelpType "\\dQuote\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
124 syn match rhelpType "\\preformatted\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
125 syn match rhelpType "\\kbd\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
126 syn match rhelpType "\\samp\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
127 syn match rhelpType "\\eqn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
128 syn match rhelpType "\\deqn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
129 syn match rhelpType "\\file\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
130 syn match rhelpType "\\email\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
131 syn match rhelpType "\\url\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
132 syn match rhelpType "\\var\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
133 syn match rhelpType "\\env\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
134 syn match rhelpType "\\option\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
135 syn match rhelpType "\\command\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
136 syn match rhelpType "\\dfn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
137 syn match rhelpType "\\cite\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
138 syn match rhelpType "\\acronym\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
139
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
140 " rhelp sections {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
141 syn match rhelpSection "\\encoding\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
142 syn match rhelpSection "\\title\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
143 syn match rhelpSection "\\description\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
144 syn match rhelpSection "\\concept\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
145 syn match rhelpSection "\\arguments\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
146 syn match rhelpSection "\\details\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
147 syn match rhelpSection "\\value\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
148 syn match rhelpSection "\\references\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
149 syn match rhelpSection "\\note\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
150 syn match rhelpSection "\\author\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
151 syn match rhelpSection "\\seealso\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
152 syn match rhelpSection "\\keyword\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
153 syn match rhelpSection "\\docType\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
154 syn match rhelpSection "\\format\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
155 syn match rhelpSection "\\source\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
156 syn match rhelpSection "\\itemize\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
157 syn match rhelpSection "\\describe\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
158 syn match rhelpSection "\\enumerate\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
159 syn match rhelpSection "\\item "
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
160 syn match rhelpSection "\\item$"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
161 syn match rhelpSection "\\tabular{[lcr]*}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
162 syn match rhelpSection "\\dontrun\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
163 syn match rhelpSection "\\dontshow\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
164 syn match rhelpSection "\\testonly\>"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 842
diff changeset
165 syn match rhelpSection "\\donttest\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
166
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
167 " Freely named Sections {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
168 syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end=/}/
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
169 syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end=/}/
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
170
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
171 " R help file comments {{{1
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
172 syn match rhelpComment /%.*$/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
173
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
174 " Error {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
175 syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpCurlyError
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
176 syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rhelpError,rhelpBraceError,rhelpParenError
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
177 syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rhelpError,rhelpCurlyError,rhelpParenError
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
178 syn match rhelpError /[)\]}]/
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
179 syn match rhelpBraceError /[)}]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
180 syn match rhelpCurlyError /[)\]]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
181 syn match rhelpParenError /[\]}]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
182
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
183 " Define the default highlighting {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
184 " For version 5.7 and earlier: only when not done already
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
185 " For version 5.8 and later: only when an item doesn't have highlighting yet
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
186 if version >= 508 || !exists("did_rhelp_syntax_inits")
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
187 if version < 508
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
188 let did_rhelp_syntax_inits = 1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
189 command -nargs=+ HiLink hi link <args>
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
190 else
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
191 command -nargs=+ HiLink hi def link <args>
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
192 endif
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
193 HiLink rhelpIdentifier Identifier
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
194 HiLink rhelpString String
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
195 HiLink rhelpKeyword Keyword
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
196 HiLink rhelpDots Keyword
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
197 HiLink rhelpLink Underlined
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
198 HiLink rhelpType Type
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
199 HiLink rhelpSection PreCondit
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
200 HiLink rhelpError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
201 HiLink rhelpBraceError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
202 HiLink rhelpCurlyError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
203 HiLink rhelpParenError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
204 HiLink rhelpDelimiter Delimiter
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
205 HiLink rhelpComment Comment
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
206 HiLink rhelpRComment Comment
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
207 HiLink rhelpSpecialChar SpecialChar
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
208 delcommand HiLink
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
209 endif
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
210
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
211 let b:current_syntax = "rhelp"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
212 " vim: foldmethod=marker: