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