annotate runtime/syntax/rhelp.vim @ 6817:cd47def2214a v7.4.730

patch 7.4.730 Problem: When setting the crypt key and using a swap file, text may be encrypted twice or unencrypted text remains in the swap file. (Issue 369) Solution: Call ml_preserve() before re-encrypting. Set correct index for next pointer block.
author Bram Moolenaar <bram@vim.org>
date Tue, 09 Jun 2015 18:35:25 +0200
parents 0efec12f52ac
children da01d5da2cfa
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
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
3 " Maintainer: Jakson Aquino <jalvesaq@gmail.com>
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
4 " Former Maintainer: Johannes Ranke <jranke@uni-bremen.de>
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
5 " Last Change: Wed Jul 09, 2014 10:28PM
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
6 " Remarks: - Includes R syntax highlighting in the appropriate
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
7 " sections if an r.vim file is in the same directory or in the
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
8 " default debian location.
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
9 " - There is no Latex markup in equations
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 1621
diff changeset
10 " - Thanks to Will Gray for finding and fixing a bug
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
11 " - 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
12 " them and have no examples at hand (help welcome).
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
13 " - No support for \var tag within quoted string (dito)
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
14
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
15 " Version Clears: {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
16 " For version 5.x: Clear all syntax items
819
23f82b5d2814 updated for version 7.0c10
vimboss
parents: 714
diff changeset
17 " 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
18 if version < 600
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
19 syntax clear
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
20 elseif exists("b:current_syntax")
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
21 finish
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
22 endif
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
23
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
24 setlocal iskeyword=@,48-57,_,.
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
25
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
26 syn case match
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
27
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
28 " R help identifiers {{{1
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
29 syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
30 syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}"
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
31 syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
32 syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
33 syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
34
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
35 " 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
36 syn include @R syntax/r.vim
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
37
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
38 " Strings {{{1
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
39 syn region rhelpString start=/"/ skip=/\\"/ end=/"/ contains=rhelpSpecialChar,rhelpCodeSpecial,rhelpLink contained
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
40
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
41 " Special characters in R strings
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
42 syn match rhelpCodeSpecial display contained "\\\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
43
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
44 " Special characters ( \$ \& \% \# \{ \} \_)
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
45 syn match rhelpSpecialChar "\\[$&%#{}_]"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
46
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
47
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
48 " R code {{{1
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
49 syn match rhelpDots "\\dots" containedin=@R
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
50 syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink,rhelpIdentifier,rhelpString,rhelpSpecialChar,rhelpSection
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
51 syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
52 syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
53 syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
54
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
55 if v:version > 703
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
56 syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
57 else
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
58 syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
59 endif
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
60 syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
61 syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
62
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
63 " PreProc {{{1
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
64 syn match rhelpPreProc "^#ifdef.*"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
65 syn match rhelpPreProc "^#endif.*"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
66
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
67 " Special Delimiters {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
68 syn match rhelpDelimiter "\\cr"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
69 syn match rhelpDelimiter "\\tab "
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
70
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
71 " Keywords {{{1
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
72 syn match rhelpKeyword "\\R"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
73 syn match rhelpKeyword "\\ldots"
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
74 syn match rhelpKeyword "--"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
75 syn match rhelpKeyword "---"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
76 syn match rhelpKeyword "<"
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
77 syn match rhelpKeyword ">"
2152
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
78 syn match rhelpKeyword "\\ge"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
79 syn match rhelpKeyword "\\le"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
80 syn match rhelpKeyword "\\alpha"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
81 syn match rhelpKeyword "\\beta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
82 syn match rhelpKeyword "\\gamma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
83 syn match rhelpKeyword "\\delta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
84 syn match rhelpKeyword "\\epsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
85 syn match rhelpKeyword "\\zeta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
86 syn match rhelpKeyword "\\eta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
87 syn match rhelpKeyword "\\theta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
88 syn match rhelpKeyword "\\iota"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
89 syn match rhelpKeyword "\\kappa"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
90 syn match rhelpKeyword "\\lambda"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
91 syn match rhelpKeyword "\\mu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
92 syn match rhelpKeyword "\\nu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
93 syn match rhelpKeyword "\\xi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
94 syn match rhelpKeyword "\\omicron"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
95 syn match rhelpKeyword "\\pi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
96 syn match rhelpKeyword "\\rho"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
97 syn match rhelpKeyword "\\sigma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
98 syn match rhelpKeyword "\\tau"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
99 syn match rhelpKeyword "\\upsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
100 syn match rhelpKeyword "\\phi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
101 syn match rhelpKeyword "\\chi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
102 syn match rhelpKeyword "\\psi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
103 syn match rhelpKeyword "\\omega"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
104 syn match rhelpKeyword "\\Alpha"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
105 syn match rhelpKeyword "\\Beta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
106 syn match rhelpKeyword "\\Gamma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
107 syn match rhelpKeyword "\\Delta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
108 syn match rhelpKeyword "\\Epsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
109 syn match rhelpKeyword "\\Zeta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
110 syn match rhelpKeyword "\\Eta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
111 syn match rhelpKeyword "\\Theta"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
112 syn match rhelpKeyword "\\Iota"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
113 syn match rhelpKeyword "\\Kappa"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
114 syn match rhelpKeyword "\\Lambda"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
115 syn match rhelpKeyword "\\Mu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
116 syn match rhelpKeyword "\\Nu"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
117 syn match rhelpKeyword "\\Xi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
118 syn match rhelpKeyword "\\Omicron"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
119 syn match rhelpKeyword "\\Pi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
120 syn match rhelpKeyword "\\Rho"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
121 syn match rhelpKeyword "\\Sigma"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
122 syn match rhelpKeyword "\\Tau"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
123 syn match rhelpKeyword "\\Upsilon"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
124 syn match rhelpKeyword "\\Phi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
125 syn match rhelpKeyword "\\Chi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
126 syn match rhelpKeyword "\\Psi"
b9e314fe473f Updated runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 2034
diff changeset
127 syn match rhelpKeyword "\\Omega"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
128
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
129 " Links {{{1
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
130 syn region rhelpLink matchgroup=rhelpSection start="\\link{" end="}" contained keepend extend
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
131 syn region rhelpLink matchgroup=rhelpSection start="\\link\[.\{-}\]{" end="}" contained keepend extend
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
132 syn region rhelpLink matchgroup=rhelpSection start="\\linkS4class{" end="}" contained keepend extend
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
133
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
134 " Verbatim like {{{1
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
135 if v:version > 703
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
136 syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
137 syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
138 else
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
139 syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
140 syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@<!{.\{-}\\\@<!}' end="}" contains=rhelpSpecialChar,rhelpComment
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
141 endif
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
142
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
143 " Type Styles {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
144 syn match rhelpType "\\emph\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
145 syn match rhelpType "\\strong\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
146 syn match rhelpType "\\bold\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
147 syn match rhelpType "\\sQuote\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
148 syn match rhelpType "\\dQuote\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
149 syn match rhelpType "\\preformatted\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
150 syn match rhelpType "\\kbd\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
151 syn match rhelpType "\\eqn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
152 syn match rhelpType "\\deqn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
153 syn match rhelpType "\\file\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
154 syn match rhelpType "\\email\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
155 syn match rhelpType "\\url\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
156 syn match rhelpType "\\href\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
157 syn match rhelpType "\\var\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
158 syn match rhelpType "\\env\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
159 syn match rhelpType "\\option\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
160 syn match rhelpType "\\command\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
161 syn match rhelpType "\\newcommand\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
162 syn match rhelpType "\\renewcommand\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
163 syn match rhelpType "\\dfn\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
164 syn match rhelpType "\\cite\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
165 syn match rhelpType "\\acronym\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
166
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
167 " rhelp sections {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
168 syn match rhelpSection "\\encoding\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
169 syn match rhelpSection "\\title\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
170 syn match rhelpSection "\\item\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
171 syn match rhelpSection "\\description\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
172 syn match rhelpSection "\\concept\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
173 syn match rhelpSection "\\arguments\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
174 syn match rhelpSection "\\details\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
175 syn match rhelpSection "\\value\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
176 syn match rhelpSection "\\references\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
177 syn match rhelpSection "\\note\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
178 syn match rhelpSection "\\author\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
179 syn match rhelpSection "\\seealso\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
180 syn match rhelpSection "\\keyword\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
181 syn match rhelpSection "\\docType\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
182 syn match rhelpSection "\\format\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
183 syn match rhelpSection "\\source\>"
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
184 syn match rhelpSection "\\itemize\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
185 syn match rhelpSection "\\describe\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
186 syn match rhelpSection "\\enumerate\>"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
187 syn match rhelpSection "\\item "
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
188 syn match rhelpSection "\\item$"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
189 syn match rhelpSection "\\tabular{[lcr]*}"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
190 syn match rhelpSection "\\dontrun\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
191 syn match rhelpSection "\\dontshow\>"
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
192 syn match rhelpSection "\\testonly\>"
1621
82b5078be2dd updated for version 7.2a
vimboss
parents: 842
diff changeset
193 syn match rhelpSection "\\donttest\>"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
194
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
195 " Freely named Sections {{{1
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
196 syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end="}"
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
197 syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}"
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
198
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
199 syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
200
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
201 " R help file comments {{{1
2662
916c90b37ea9 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2152
diff changeset
202 syn match rhelpComment /%.*$/
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
203
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
204 " Error {{{1
3153
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2725
diff changeset
205 syn region rhelpRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2725
diff changeset
206 syn region rhelpRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim
37ecb8ff4560 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2725
diff changeset
207 syn region rhelpRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ contains=@Spell,rhelpCodeSpecial,rhelpComment,rhelpDelimiter,rhelpDots,rhelpFreesec,rhelpFreesubsec,rhelpIdentifier,rhelpKeyword,rhelpLink,rhelpPreProc,rhelpRComment,rhelpRcode,rhelpRegion,rhelpS4method,rhelpSection,rhelpSexpr,rhelpSpecialChar,rhelpString,rhelpType,rhelpVerbatim
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
208 syn match rhelpError /[)\]}]/
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
209 syn match rhelpBraceError /[)}]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
210 syn match rhelpCurlyError /[)\]]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
211 syn match rhelpParenError /[\]}]/ contained
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
212
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
213 syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{"
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
214
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
215 " Define the default highlighting {{{1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
216 " For version 5.7 and earlier: only when not done already
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
217 " 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
218 if version >= 508 || !exists("did_rhelp_syntax_inits")
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
219 if version < 508
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
220 let did_rhelp_syntax_inits = 1
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
221 command -nargs=+ HiLink hi link <args>
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
222 else
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
223 command -nargs=+ HiLink hi def link <args>
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
224 endif
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
225 HiLink rhelpVerbatim String
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
226 HiLink rhelpDelimiter Delimiter
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
227 HiLink rhelpIdentifier Identifier
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
228 HiLink rhelpString String
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
229 HiLink rhelpCodeSpecial Special
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
230 HiLink rhelpKeyword Keyword
842
a209672376fd updated for version 7.0f
vimboss
parents: 827
diff changeset
231 HiLink rhelpDots Keyword
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
232 HiLink rhelpLink Underlined
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
233 HiLink rhelpType Type
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
234 HiLink rhelpSection PreCondit
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
235 HiLink rhelpError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
236 HiLink rhelpBraceError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
237 HiLink rhelpCurlyError Error
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
238 HiLink rhelpParenError Error
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2662
diff changeset
239 HiLink rhelpPreProc PreProc
714
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
240 HiLink rhelpDelimiter Delimiter
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
241 HiLink rhelpComment Comment
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
242 HiLink rhelpRComment Comment
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
243 HiLink rhelpSpecialChar SpecialChar
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
244 delcommand HiLink
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
245 endif
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
246
0f9f4761ad9c updated for version 7.0216
vimboss
parents:
diff changeset
247 let b:current_syntax = "rhelp"
6051
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
248
0efec12f52ac Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 3153
diff changeset
249 " vim: foldmethod=marker sw=2