Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 1 | " Vim syntax file |
| 2 | " Language: R Help File |
Christian Brabandt | f9ca139 | 2024-02-19 20:37:11 +0100 | [diff] [blame] | 3 | " Maintainer: This runtime file is looking for a new maintainer. |
| 4 | " Former Maintainers: Jakson Aquino <jalvesaq@gmail.com> |
| 5 | " Johannes Ranke <jranke@uni-bremen.de> |
| 6 | " Former Repository: https://github.com/jalvesaq/R-Vim-runtime |
| 7 | " Last Change: 2016 Jun 28 08:53AM |
| 8 | " 2024 Feb 19 by Vim Project (announce adoption) |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 9 | " Remarks: - Includes R syntax highlighting in the appropriate |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 10 | " sections if an r.vim file is in the same directory or in the |
| 11 | " default debian location. |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 12 | " - There is no Latex markup in equations |
Bram Moolenaar | 5c73622 | 2010-01-06 20:54:52 +0100 | [diff] [blame] | 13 | " - Thanks to Will Gray for finding and fixing a bug |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 14 | " - No support for \var tag within quoted string |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 15 | |
| 16 | " Version Clears: {{{1 |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 17 | if exists("b:current_syntax") |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 18 | finish |
| 19 | endif |
| 20 | |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 21 | scriptencoding utf-8 |
Bram Moolenaar | db6ea06 | 2014-07-10 22:01:47 +0200 | [diff] [blame] | 22 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 23 | syn case match |
| 24 | |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 25 | " R help identifiers {{{1 |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 26 | syn region rhelpIdentifier matchgroup=rhelpSection start="\\name{" end="}" |
| 27 | syn region rhelpIdentifier matchgroup=rhelpSection start="\\alias{" end="}" |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 28 | syn region rhelpIdentifier matchgroup=rhelpSection start="\\pkg{" end="}" contains=rhelpLink |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 29 | syn region rhelpIdentifier matchgroup=rhelpSection start="\\CRANpkg{" end="}" contains=rhelpLink |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 30 | syn region rhelpIdentifier matchgroup=rhelpSection start="\\method{" end="}" contained |
| 31 | syn region rhelpIdentifier matchgroup=rhelpSection start="\\Rdversion{" end="}" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 32 | |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 33 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 34 | " Highlighting of R code using an existing r.vim syntax file if available {{{1 |
Bram Moolenaar | 18144c8 | 2006-04-12 21:52:12 +0000 | [diff] [blame] | 35 | syn include @R syntax/r.vim |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 36 | |
| 37 | " Strings {{{1 |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 38 | syn region rhelpString start=/"/ skip=/\\"/ end=/"/ contains=rhelpSpecialChar,rhelpCodeSpecial,rhelpLink contained |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 39 | |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 40 | " Special characters in R strings |
| 41 | syn match rhelpCodeSpecial display contained "\\\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\" |
| 42 | |
| 43 | " Special characters ( \$ \& \% \# \{ \} \_) |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 44 | syn match rhelpSpecialChar "\\[$&%#{}_]" |
| 45 | |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 46 | |
| 47 | " R code {{{1 |
| 48 | syn match rhelpDots "\\dots" containedin=@R |
| 49 | syn region rhelpRcode matchgroup=Delimiter start="\\examples{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpLink,rhelpIdentifier,rhelpString,rhelpSpecialChar,rhelpSection |
| 50 | syn region rhelpRcode matchgroup=Delimiter start="\\usage{" matchgroup=Delimiter transparent end="}" contains=@R,rhelpIdentifier,rhelpS4method |
| 51 | syn region rhelpRcode matchgroup=Delimiter start="\\synopsis{" matchgroup=Delimiter transparent end="}" contains=@R |
| 52 | syn region rhelpRcode matchgroup=Delimiter start="\\special{" matchgroup=Delimiter transparent end="}" contains=@R |
Bram Moolenaar | db6ea06 | 2014-07-10 22:01:47 +0200 | [diff] [blame] | 53 | |
| 54 | if v:version > 703 |
| 55 | syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@1<!{.\{-}\\\@1<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend |
| 56 | else |
| 57 | syn region rhelpRcode matchgroup=Delimiter start="\\code{" skip='\\\@<!{.\{-}\\\@<!}' transparent end="}" contains=@R,rhelpDots,rhelpString,rhelpSpecialChar,rhelpLink keepend |
| 58 | endif |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 59 | syn region rhelpS4method matchgroup=Delimiter start="\\S4method{.*}(" matchgroup=Delimiter transparent end=")" contains=@R,rhelpDots |
| 60 | syn region rhelpSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter transparent end="}" contains=@R |
| 61 | |
| 62 | " PreProc {{{1 |
| 63 | syn match rhelpPreProc "^#ifdef.*" |
| 64 | syn match rhelpPreProc "^#endif.*" |
| 65 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 66 | " Special Delimiters {{{1 |
| 67 | syn match rhelpDelimiter "\\cr" |
| 68 | syn match rhelpDelimiter "\\tab " |
| 69 | |
| 70 | " Keywords {{{1 |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 71 | syn match rhelpKeyword "\\R\>" |
| 72 | syn match rhelpKeyword "\\ldots\>" |
| 73 | syn match rhelpKeyword "\\sspace\>" |
Bram Moolenaar | f9393ef | 2006-04-24 19:47:27 +0000 | [diff] [blame] | 74 | syn match rhelpKeyword "--" |
| 75 | syn match rhelpKeyword "---" |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 76 | |
| 77 | " Condition Keywords {{{2 |
| 78 | syn match rhelpKeyword "\\if\>" |
| 79 | syn match rhelpKeyword "\\ifelse\>" |
| 80 | syn match rhelpKeyword "\\out\>" |
| 81 | " Examples of usage: |
| 82 | " \ifelse{latex}{\eqn{p = 5 + 6 - 7 \times 8}}{\eqn{p = 5 + 6 - 7 * 8}} |
| 83 | " \ifelse{latex}{\out{$\alpha$}}{\ifelse{html}{\out{α}}{alpha}} |
| 84 | |
| 85 | " Keywords and operators valid only if in math mode {{{2 |
| 86 | syn match rhelpMathOp "<" contained |
| 87 | syn match rhelpMathOp ">" contained |
| 88 | syn match rhelpMathOp "+" contained |
| 89 | syn match rhelpMathOp "-" contained |
| 90 | syn match rhelpMathOp "=" contained |
| 91 | |
| 92 | " Conceal function based on syntax/tex.vim {{{2 |
| 93 | if exists("g:tex_conceal") |
| 94 | let s:tex_conceal = g:tex_conceal |
| 95 | else |
| 96 | let s:tex_conceal = 'gm' |
| 97 | endif |
| 98 | function s:HideSymbol(pat, cchar, hide) |
| 99 | if a:hide |
| 100 | exe "syn match rhelpMathSymb '" . a:pat . "' contained conceal cchar=" . a:cchar |
| 101 | else |
| 102 | exe "syn match rhelpMathSymb '" . a:pat . "' contained" |
| 103 | endif |
| 104 | endfunction |
| 105 | |
| 106 | " Math symbols {{{2 |
| 107 | if s:tex_conceal =~ 'm' |
| 108 | let s:hd = 1 |
| 109 | else |
| 110 | let s:hd = 0 |
| 111 | endif |
| 112 | call s:HideSymbol('\\infty\>', '∞', s:hd) |
| 113 | call s:HideSymbol('\\ge\>', '≥', s:hd) |
| 114 | call s:HideSymbol('\\le\>', '≤', s:hd) |
| 115 | call s:HideSymbol('\\prod\>', '∏', s:hd) |
| 116 | call s:HideSymbol('\\sum\>', '∑', s:hd) |
| 117 | syn match rhelpMathSymb "\\sqrt\>" contained |
| 118 | |
| 119 | " Greek letters {{{2 |
| 120 | if s:tex_conceal =~ 'g' |
| 121 | let s:hd = 1 |
| 122 | else |
| 123 | let s:hd = 0 |
| 124 | endif |
| 125 | call s:HideSymbol('\\alpha\>', 'α', s:hd) |
| 126 | call s:HideSymbol('\\beta\>', 'β', s:hd) |
| 127 | call s:HideSymbol('\\gamma\>', 'γ', s:hd) |
| 128 | call s:HideSymbol('\\delta\>', 'δ', s:hd) |
| 129 | call s:HideSymbol('\\epsilon\>', 'ϵ', s:hd) |
| 130 | call s:HideSymbol('\\zeta\>', 'ζ', s:hd) |
| 131 | call s:HideSymbol('\\eta\>', 'η', s:hd) |
| 132 | call s:HideSymbol('\\theta\>', 'θ', s:hd) |
| 133 | call s:HideSymbol('\\iota\>', 'ι', s:hd) |
| 134 | call s:HideSymbol('\\kappa\>', 'κ', s:hd) |
| 135 | call s:HideSymbol('\\lambda\>', 'λ', s:hd) |
| 136 | call s:HideSymbol('\\mu\>', 'μ', s:hd) |
| 137 | call s:HideSymbol('\\nu\>', 'ν', s:hd) |
| 138 | call s:HideSymbol('\\xi\>', 'ξ', s:hd) |
| 139 | call s:HideSymbol('\\pi\>', 'π', s:hd) |
| 140 | call s:HideSymbol('\\rho\>', 'ρ', s:hd) |
| 141 | call s:HideSymbol('\\sigma\>', 'σ', s:hd) |
| 142 | call s:HideSymbol('\\tau\>', 'τ', s:hd) |
| 143 | call s:HideSymbol('\\upsilon\>', 'υ', s:hd) |
| 144 | call s:HideSymbol('\\phi\>', 'ϕ', s:hd) |
| 145 | call s:HideSymbol('\\chi\>', 'χ', s:hd) |
| 146 | call s:HideSymbol('\\psi\>', 'ψ', s:hd) |
| 147 | call s:HideSymbol('\\omega\>', 'ω', s:hd) |
| 148 | call s:HideSymbol('\\Gamma\>', 'Γ', s:hd) |
| 149 | call s:HideSymbol('\\Delta\>', 'Δ', s:hd) |
| 150 | call s:HideSymbol('\\Theta\>', 'Θ', s:hd) |
| 151 | call s:HideSymbol('\\Lambda\>', 'Λ', s:hd) |
| 152 | call s:HideSymbol('\\Xi\>', 'Ξ', s:hd) |
| 153 | call s:HideSymbol('\\Pi\>', 'Π', s:hd) |
| 154 | call s:HideSymbol('\\Sigma\>', 'Σ', s:hd) |
| 155 | call s:HideSymbol('\\Upsilon\>', 'Υ', s:hd) |
| 156 | call s:HideSymbol('\\Phi\>', 'Φ', s:hd) |
| 157 | call s:HideSymbol('\\Psi\>', 'Ψ', s:hd) |
| 158 | call s:HideSymbol('\\Omega\>', 'Ω', s:hd) |
| 159 | delfunction s:HideSymbol |
| 160 | " Note: The letters 'omicron', 'Alpha', 'Beta', 'Epsilon', 'Zeta', 'Eta', |
| 161 | " 'Iota', 'Kappa', 'Mu', 'Nu', 'Omicron', 'Rho', 'Tau' and 'Chi' are listed |
| 162 | " at src/library/tools/R/Rd2txt.R because they are valid in HTML, although |
| 163 | " they do not make valid LaTeX code (e.g. Α versus \Alpha). |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 164 | |
| 165 | " Links {{{1 |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 166 | syn region rhelpLink matchgroup=rhelpType start="\\link{" end="}" contained keepend extend |
| 167 | syn region rhelpLink matchgroup=rhelpType start="\\link\[.\{-}\]{" end="}" contained keepend extend |
| 168 | syn region rhelpLink matchgroup=rhelpType start="\\linkS4class{" end="}" contained keepend extend |
| 169 | syn region rhelpLink matchgroup=rhelpType start="\\url{" end="}" contained keepend extend |
| 170 | syn region rhelpLink matchgroup=rhelpType start="\\href{" end="}" contained keepend extend |
| 171 | syn region rhelpLink matchgroup=rhelpType start="\\figure{" end="}" contained keepend extend |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 172 | |
| 173 | " Verbatim like {{{1 |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 174 | syn region rhelpVerbatim matchgroup=rhelpType start="\\samp{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment |
| 175 | syn region rhelpVerbatim matchgroup=rhelpType start="\\verb{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpSpecialChar,rhelpComment |
| 176 | |
| 177 | " Equation {{{1 |
| 178 | syn region rhelpEquation matchgroup=rhelpType start="\\eqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend |
| 179 | syn region rhelpEquation matchgroup=rhelpType start="\\deqn{" skip='\\\@1<!{.\{-}\\\@1<!}' end="}" contains=rhelpMathSymb,rhelpMathOp,rhelpRegion contained keepend extend |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 180 | |
| 181 | " Type Styles {{{1 |
| 182 | syn match rhelpType "\\emph\>" |
| 183 | syn match rhelpType "\\strong\>" |
| 184 | syn match rhelpType "\\bold\>" |
| 185 | syn match rhelpType "\\sQuote\>" |
| 186 | syn match rhelpType "\\dQuote\>" |
| 187 | syn match rhelpType "\\preformatted\>" |
| 188 | syn match rhelpType "\\kbd\>" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 189 | syn match rhelpType "\\file\>" |
| 190 | syn match rhelpType "\\email\>" |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 191 | syn match rhelpType "\\enc\>" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 192 | syn match rhelpType "\\var\>" |
| 193 | syn match rhelpType "\\env\>" |
| 194 | syn match rhelpType "\\option\>" |
| 195 | syn match rhelpType "\\command\>" |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 196 | syn match rhelpType "\\newcommand\>" |
| 197 | syn match rhelpType "\\renewcommand\>" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 198 | syn match rhelpType "\\dfn\>" |
| 199 | syn match rhelpType "\\cite\>" |
| 200 | syn match rhelpType "\\acronym\>" |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 201 | syn match rhelpType "\\doi\>" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 202 | |
| 203 | " rhelp sections {{{1 |
| 204 | syn match rhelpSection "\\encoding\>" |
| 205 | syn match rhelpSection "\\title\>" |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 206 | syn match rhelpSection "\\item\>" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 207 | syn match rhelpSection "\\description\>" |
| 208 | syn match rhelpSection "\\concept\>" |
| 209 | syn match rhelpSection "\\arguments\>" |
| 210 | syn match rhelpSection "\\details\>" |
| 211 | syn match rhelpSection "\\value\>" |
| 212 | syn match rhelpSection "\\references\>" |
| 213 | syn match rhelpSection "\\note\>" |
| 214 | syn match rhelpSection "\\author\>" |
| 215 | syn match rhelpSection "\\seealso\>" |
| 216 | syn match rhelpSection "\\keyword\>" |
| 217 | syn match rhelpSection "\\docType\>" |
| 218 | syn match rhelpSection "\\format\>" |
| 219 | syn match rhelpSection "\\source\>" |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 220 | syn match rhelpSection "\\itemize\>" |
| 221 | syn match rhelpSection "\\describe\>" |
| 222 | syn match rhelpSection "\\enumerate\>" |
| 223 | syn match rhelpSection "\\item " |
| 224 | syn match rhelpSection "\\item$" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 225 | syn match rhelpSection "\\tabular{[lcr]*}" |
| 226 | syn match rhelpSection "\\dontrun\>" |
| 227 | syn match rhelpSection "\\dontshow\>" |
| 228 | syn match rhelpSection "\\testonly\>" |
Bram Moolenaar | 446cb83 | 2008-06-24 21:56:24 +0000 | [diff] [blame] | 229 | syn match rhelpSection "\\donttest\>" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 230 | |
| 231 | " Freely named Sections {{{1 |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 232 | syn region rhelpFreesec matchgroup=Delimiter start="\\section{" matchgroup=Delimiter transparent end="}" |
| 233 | syn region rhelpFreesubsec matchgroup=Delimiter start="\\subsection{" matchgroup=Delimiter transparent end="}" |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 234 | |
Bram Moolenaar | 662db67 | 2011-03-22 14:05:35 +0100 | [diff] [blame] | 235 | syn match rhelpDelimiter "{\|\[\|(\|)\|\]\|}" |
| 236 | |
Bram Moolenaar | f9393ef | 2006-04-24 19:47:27 +0000 | [diff] [blame] | 237 | " R help file comments {{{1 |
Bram Moolenaar | 81af925 | 2010-12-10 20:35:50 +0100 | [diff] [blame] | 238 | syn match rhelpComment /%.*$/ |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 239 | |
| 240 | " Error {{{1 |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 241 | 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,rhelpEquation |
| 242 | 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,rhelpEquation |
| 243 | 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,rhelpEquation |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 244 | syn match rhelpError /[)\]}]/ |
| 245 | syn match rhelpBraceError /[)}]/ contained |
| 246 | syn match rhelpCurlyError /[)\]]/ contained |
| 247 | syn match rhelpParenError /[\]}]/ contained |
| 248 | |
Bram Moolenaar | db6ea06 | 2014-07-10 22:01:47 +0200 | [diff] [blame] | 249 | syntax sync match rhelpSyncRcode grouphere rhelpRcode "\\examples{" |
| 250 | |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 251 | " Define the default highlighting {{{1 |
Bram Moolenaar | 77cdfd1 | 2016-03-12 12:57:59 +0100 | [diff] [blame] | 252 | hi def link rhelpVerbatim String |
| 253 | hi def link rhelpDelimiter Delimiter |
| 254 | hi def link rhelpIdentifier Identifier |
| 255 | hi def link rhelpString String |
| 256 | hi def link rhelpCodeSpecial Special |
| 257 | hi def link rhelpKeyword Keyword |
| 258 | hi def link rhelpDots Keyword |
| 259 | hi def link rhelpLink Underlined |
| 260 | hi def link rhelpType Type |
| 261 | hi def link rhelpSection PreCondit |
| 262 | hi def link rhelpError Error |
| 263 | hi def link rhelpBraceError Error |
| 264 | hi def link rhelpCurlyError Error |
| 265 | hi def link rhelpParenError Error |
| 266 | hi def link rhelpPreProc PreProc |
| 267 | hi def link rhelpDelimiter Delimiter |
| 268 | hi def link rhelpComment Comment |
| 269 | hi def link rhelpRComment Comment |
| 270 | hi def link rhelpSpecialChar SpecialChar |
| 271 | hi def link rhelpMathSymb Special |
| 272 | hi def link rhelpMathOp Operator |
Bram Moolenaar | 362e1a3 | 2006-03-06 23:29:24 +0000 | [diff] [blame] | 273 | |
| 274 | let b:current_syntax = "rhelp" |
Bram Moolenaar | db6ea06 | 2014-07-10 22:01:47 +0200 | [diff] [blame] | 275 | |
| 276 | " vim: foldmethod=marker sw=2 |