blob: 45ff498b3bed5a0f0a2e62530d44bf3d155e149e [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
Bram Moolenaar483c5d82010-10-20 18:45:33 +02002" Language: R (GNU S)
3" Maintainer: Jakson Aquino <jalvesaq@gmail.com>
4" Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
5" Tom Payne <tom@tompayne.org>
Bram Moolenaar2c5e8e82015-12-05 20:59:21 +01006" Contributor: Johannes Ranke <jranke@uni-bremen.de>
7" Homepage: https://github.com/jalvesaq/R-Vim-runtime
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +02008" Last Change: Sat Apr 08, 2017 07:01PM
Bram Moolenaar483c5d82010-10-20 18:45:33 +02009" Filenames: *.R *.r *.Rhistory *.Rt
Bram Moolenaar8feef4f2015-01-07 16:57:10 +010010"
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020011" NOTE: The highlighting of R functions might be defined in
Bram Moolenaar8feef4f2015-01-07 16:57:10 +010012" runtime files created by a filetype plugin, if installed.
Bram Moolenaar483c5d82010-10-20 18:45:33 +020013"
Bram Moolenaar662db672011-03-22 14:05:35 +010014" CONFIGURATION:
Bram Moolenaar77cdfd12016-03-12 12:57:59 +010015" Syntax folding can be turned on by
Bram Moolenaar662db672011-03-22 14:05:35 +010016"
17" let r_syntax_folding = 1
18"
Bram Moolenaar77cdfd12016-03-12 12:57:59 +010019" ROxygen highlighting can be turned off by
20"
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020021" let r_syntax_hl_roxygen = 0
Bram Moolenaar77cdfd12016-03-12 12:57:59 +010022"
Bram Moolenaar483c5d82010-10-20 18:45:33 +020023" Some lines of code were borrowed from Zhuojun Chen.
Bram Moolenaar4770d092006-01-12 23:22:24 +000024
Bram Moolenaar483c5d82010-10-20 18:45:33 +020025if exists("b:current_syntax")
Bram Moolenaar071d4272004-06-13 20:20:40 +000026 finish
27endif
28
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020029if has("patch-7.4.1142")
30 syn iskeyword @,48-57,_,.
31else
32 setlocal iskeyword=@,48-57,_,.
33endif
34
35" The variables g:r_hl_roxygen and g:r_syn_minlines were renamed on April 8, 2017.
36if exists("g:r_hl_roxygen")
37 let g:r_syntax_hl_roxygen = g:r_hl_roxygen
38endif
39if exists("g:r_syn_minlines")
40 let g:r_syntax_minlines = g:r_syn_minlines
41endif
Bram Moolenaar071d4272004-06-13 20:20:40 +000042
Bram Moolenaar77cdfd12016-03-12 12:57:59 +010043if exists("g:r_syntax_folding") && g:r_syntax_folding
Bram Moolenaar662db672011-03-22 14:05:35 +010044 setlocal foldmethod=syntax
45endif
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020046if !exists("g:r_syntax_hl_roxygen")
47 let g:r_syntax_hl_roxygen = 1
Bram Moolenaar77cdfd12016-03-12 12:57:59 +010048endif
Bram Moolenaar662db672011-03-22 14:05:35 +010049
Bram Moolenaar071d4272004-06-13 20:20:40 +000050syn case match
51
52" Comment
Bram Moolenaardb6ea062014-07-10 22:01:47 +020053syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):"
Bram Moolenaar2c5e8e82015-12-05 20:59:21 +010054syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*"
Bram Moolenaar203d04d2013-06-06 21:36:40 +020055
56" Roxygen
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020057if g:r_syntax_hl_roxygen
58 " A roxygen block can start at the beginning of a file (first version) and
59 " after a blank line (second version). It ends when a line that does not
60 " contain a roxygen comment. In the following comments, any line containing
61 " a roxygen comment marker (one or two hash signs # followed by a single
62 " quote ' and preceded only by whitespace) is called a roxygen line. A
63 " roxygen line containing only a roxygen comment marker, optionally followed
64 " by whitespace is called an empty roxygen line.
Bram Moolenaar2c5e8e82015-12-05 20:59:21 +010065
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020066 " First we match all roxygen blocks as containing only a title. In case an
67 " empty roxygen line ending the title or a tag is found, this will be
68 " overriden later by the definitions of rOBlock.
69 syn match rOTitleBlock "\%^\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag
70 syn match rOTitleBlock "^\s*\n\(\s*#\{1,2}' .*\n\)\{1,}" contains=rOCommentKey,rOTitleTag
Bram Moolenaar2c5e8e82015-12-05 20:59:21 +010071
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +020072 " When a roxygen block has a title and additional content, the title
73 " consists of one or more roxygen lines (as little as possible are matched),
74 " followed either by an empty roxygen line
75 syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
76 syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
77
78 " or by a roxygen tag (we match everything starting with @ but not @@ which is used as escape sequence for a literal @).
79 syn region rOBlock start="\%^\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
80 syn region rOBlock start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-}\s*#\{1,2}' @\(@\)\@!" end="^\s*\(#\{1,2}'\)\@!" contains=rOTitle,rOTag,rOExamples,@Spell keepend fold
81
82 " If a block contains an @rdname, @describeIn tag, it may have paragraph breaks, but does not have a title
83 syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
84 syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @rdname" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
85 syn region rOBlockNoTitle start="\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
86 syn region rOBlockNoTitle start="^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*\n\(\s*#\{1,2}'.*\n\)\{-}\s*#\{1,2}' @describeIn" end="^\s*\(#\{1,2}'\)\@!" contains=rOTag,rOExamples,@Spell keepend fold
87
88 " A title as part of a block is always at the beginning of the block, i.e.
89 " either at the start of a file or after a completely empty line.
90 syn match rOTitle "\%^\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag
91 syn match rOTitle "^\s*\n\(\s*#\{1,2}' .*\n\)\{-1,}\s*#\{1,2}'\s*$" contained contains=rOCommentKey,rOTitleTag
92 syn match rOTitleTag contained "@title"
93
94 syn match rOCommentKey "#\{1,2}'" contained
95 syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOTag fold
96
97 " rOTag list generated from the lists in
98 " https://github.com/klutometis/roxygen/R/rd.R and
99 " https://github.com/klutometis/roxygen/R/namespace.R
100 " using s/^ \([A-Za-z0-9]*\) = .*/ syn match rOTag contained "@\1"/
101 " Plus we need the @include tag
102
103 " rd.R
104 syn match rOTag contained "@aliases"
105 syn match rOTag contained "@author"
106 syn match rOTag contained "@backref"
107 syn match rOTag contained "@concept"
108 syn match rOTag contained "@describeIn"
109 syn match rOTag contained "@description"
110 syn match rOTag contained "@details"
111 syn match rOTag contained "@docType"
112 syn match rOTag contained "@encoding"
113 syn match rOTag contained "@evalRd"
114 syn match rOTag contained "@example"
115 syn match rOTag contained "@examples"
116 syn match rOTag contained "@family"
117 syn match rOTag contained "@field"
118 syn match rOTag contained "@format"
119 syn match rOTag contained "@inherit"
120 syn match rOTag contained "@inheritParams"
121 syn match rOTag contained "@inheritDotParams"
122 syn match rOTag contained "@inheritSection"
123 syn match rOTag contained "@keywords"
124 syn match rOTag contained "@method"
125 syn match rOTag contained "@name"
126 syn match rOTag contained "@md"
127 syn match rOTag contained "@noMd"
128 syn match rOTag contained "@noRd"
129 syn match rOTag contained "@note"
130 syn match rOTag contained "@param"
131 syn match rOTag contained "@rdname"
132 syn match rOTag contained "@rawRd"
133 syn match rOTag contained "@references"
134 syn match rOTag contained "@return"
135 syn match rOTag contained "@section"
136 syn match rOTag contained "@seealso"
137 syn match rOTag contained "@slot"
138 syn match rOTag contained "@source"
139 syn match rOTag contained "@template"
140 syn match rOTag contained "@templateVar"
141 syn match rOTag contained "@title"
142 syn match rOTag contained "@usage"
143 " namespace.R
144 syn match rOTag contained "@export"
145 syn match rOTag contained "@exportClass"
146 syn match rOTag contained "@exportMethod"
147 syn match rOTag contained "@exportPattern"
148 syn match rOTag contained "@import"
149 syn match rOTag contained "@importClassesFrom"
150 syn match rOTag contained "@importFrom"
151 syn match rOTag contained "@importMethodsFrom"
152 syn match rOTag contained "@rawNamespace"
153 syn match rOTag contained "@S3method"
154 syn match rOTag contained "@useDynLib"
155 " other
156 syn match rOTag contained "@include"
Bram Moolenaar77cdfd12016-03-12 12:57:59 +0100157endif
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200158
Bram Moolenaar071d4272004-06-13 20:20:40 +0000159
Bram Moolenaar662db672011-03-22 14:05:35 +0100160if &filetype == "rhelp"
161 " string enclosed in double quotes
162 syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
163 " string enclosed in single quotes
164 syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
165else
166 " string enclosed in double quotes
167 syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
168 " string enclosed in single quotes
169 syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
170endif
Bram Moolenaar071d4272004-06-13 20:20:40 +0000171
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200172syn match rStrError display contained "\\."
173
Bram Moolenaar662db672011-03-22 14:05:35 +0100174
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200175" New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash
176syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
177
178" Hexadecimal and Octal digits
179syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)"
180
181" Unicode characters
182syn match rSpecial display contained "\\u\x\{1,4}"
183syn match rSpecial display contained "\\U\x\{1,8}"
184syn match rSpecial display contained "\\u{\x\{1,4}}"
185syn match rSpecial display contained "\\U{\x\{1,8}}"
186
Bram Moolenaar071d4272004-06-13 20:20:40 +0000187" Statement
188syn keyword rStatement break next return
189syn keyword rConditional if else
190syn keyword rRepeat for in repeat while
191
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200192" Constant (not really)
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200193syn keyword rConstant T F LETTERS letters month.abb month.name pi
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200194syn keyword rConstant R.version.string
195
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100196syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
Bram Moolenaar662db672011-03-22 14:05:35 +0100197
198" Constants
Bram Moolenaar071d4272004-06-13 20:20:40 +0000199syn keyword rConstant NULL
200syn keyword rBoolean FALSE TRUE
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100201syn keyword rNumber NA Inf NaN
Bram Moolenaar071d4272004-06-13 20:20:40 +0000202
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200203" integer
204syn match rInteger "\<\d\+L"
205syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L"
206syn match rInteger "\<\d\+[Ee]+\=\d\+L"
207
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200208" number with no fractional part or exponent
209syn match rNumber "\<\d\+\>"
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100210" hexadecimal number
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200211syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+"
212
213" floating point number with integer and fractional parts and optional exponent
214syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\="
215" floating point number with no integer part and optional exponent
216syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\="
217" floating point number with no fractional part and optional exponent
218syn match rFloat "\<\d\+[Ee][-+]\=\d\+"
219
Bram Moolenaar662db672011-03-22 14:05:35 +0100220" complex number
221syn match rComplex "\<\d\+i"
222syn match rComplex "\<\d\++\d\+i"
223syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i"
224syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
225syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
226syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
227
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100228syn match rAssign '='
Bram Moolenaar662db672011-03-22 14:05:35 +0100229syn match rOperator "&"
230syn match rOperator '-'
Bram Moolenaare6ae6222013-05-21 21:01:10 +0200231syn match rOperator '\*'
Bram Moolenaar662db672011-03-22 14:05:35 +0100232syn match rOperator '+'
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200233if &filetype != "rmd" && &filetype != "rrst"
234 syn match rOperator "[|!<>^~/:]"
235else
236 syn match rOperator "[|!<>^~`/:]"
237endif
Bram Moolenaardb6ea062014-07-10 22:01:47 +0200238syn match rOperator "%\{2}\|%\S\{-}%"
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100239syn match rOperator '\([!><]\)\@<=='
240syn match rOperator '=='
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200241syn match rOpError '\*\{3}'
Bram Moolenaar662db672011-03-22 14:05:35 +0100242syn match rOpError '//'
243syn match rOpError '&&&'
244syn match rOpError '|||'
245syn match rOpError '<<'
246syn match rOpError '>>'
247
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100248syn match rAssign "<\{1,2}-"
249syn match rAssign "->\{1,2}"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000250
251" Special
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200252syn match rDelimiter "[,;:]"
Bram Moolenaar071d4272004-06-13 20:20:40 +0000253
254" Error
Bram Moolenaar662db672011-03-22 14:05:35 +0100255if exists("g:r_syntax_folding")
256 syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold
257 syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError fold
258 syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError fold
259else
260 syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
261 syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
262 syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
263endif
264
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200265syn match rError "[)\]}]"
266syn match rBraceError "[)}]" contained
267syn match rCurlyError "[)\]]" contained
268syn match rParenError "[\]}]" contained
269
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +0200270" Use Nvim-R to highlight functions dynamically if it is installed
271if !exists("g:r_syntax_fun_pattern")
272 let s:ff = split(substitute(globpath(&rtp, "R/functions.vim"), "functions.vim", "", "g"), "\n")
273 if len(s:ff) > 0
274 let g:r_syntax_fun_pattern = 0
275 else
276 let g:r_syntax_fun_pattern = 1
277 endif
Bram Moolenaar77cdfd12016-03-12 12:57:59 +0100278endif
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +0200279
280" Only use Nvim-R to highlight functions if they should not be highlighted
281" according to a generic pattern
282if g:r_syntax_fun_pattern == 1
283 syn match rFunction '[0-9a-zA-Z_\.]\+\s*\ze('
284else
285 if !exists("g:R_hi_fun")
286 let g:R_hi_fun = 1
287 endif
288 if g:R_hi_fun
289 " Nvim-R:
290 runtime R/functions.vim
291 endif
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100292endif
Bram Moolenaar662db672011-03-22 14:05:35 +0100293
294syn match rDollar display contained "\$"
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200295syn match rDollar display contained "@"
Bram Moolenaar662db672011-03-22 14:05:35 +0100296
297" List elements will not be highlighted as functions:
298syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200299syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
Bram Moolenaar662db672011-03-22 14:05:35 +0100300
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200301" Functions that may add new objects
302syn keyword rPreProc library require attach detach source
303
Bram Moolenaar662db672011-03-22 14:05:35 +0100304if &filetype == "rhelp"
Bram Moolenaardb6ea062014-07-10 22:01:47 +0200305 syn match rHelpIdent '\\method'
306 syn match rHelpIdent '\\S4method'
Bram Moolenaar662db672011-03-22 14:05:35 +0100307endif
308
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200309" Type
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100310syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
Bram Moolenaar071d4272004-06-13 20:20:40 +0000311
Bram Moolenaar662db672011-03-22 14:05:35 +0100312" Name of object with spaces
Bram Moolenaar203d04d2013-06-06 21:36:40 +0200313if &filetype != "rmd" && &filetype != "rrst"
314 syn region rNameWSpace start="`" end="`"
315endif
Bram Moolenaar662db672011-03-22 14:05:35 +0100316
317if &filetype == "rhelp"
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100318 syn match rhPreProc "^#ifdef.*"
319 syn match rhPreProc "^#endif.*"
Bram Moolenaar662db672011-03-22 14:05:35 +0100320 syn match rhSection "\\dontrun\>"
321endif
322
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +0200323if exists("r_syntax_minlines")
324 exe "syn sync minlines=" . r_syntax_minlines
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100325else
326 syn sync minlines=40
327endif
328
Bram Moolenaar071d4272004-06-13 20:20:40 +0000329" Define the default highlighting.
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100330hi def link rAssign Statement
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200331hi def link rBoolean Boolean
332hi def link rBraceError Error
333hi def link rComment Comment
Bram Moolenaardb6ea062014-07-10 22:01:47 +0200334hi def link rCommentTodo Todo
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200335hi def link rComplex Number
336hi def link rConditional Conditional
337hi def link rConstant Constant
338hi def link rCurlyError Error
339hi def link rDelimiter Delimiter
340hi def link rDollar SpecialChar
341hi def link rError Error
342hi def link rFloat Float
Bram Moolenaar662db672011-03-22 14:05:35 +0100343hi def link rFunction Function
344hi def link rHelpIdent Identifier
345hi def link rhPreProc PreProc
346hi def link rhSection PreCondit
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200347hi def link rInteger Number
Bram Moolenaar8feef4f2015-01-07 16:57:10 +0100348hi def link rLstElmt Normal
Bram Moolenaar662db672011-03-22 14:05:35 +0100349hi def link rNameWSpace Normal
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200350hi def link rNumber Number
351hi def link rOperator Operator
Bram Moolenaar662db672011-03-22 14:05:35 +0100352hi def link rOpError Error
Bram Moolenaar483c5d82010-10-20 18:45:33 +0200353hi def link rParenError Error
354hi def link rPreProc PreProc
355hi def link rRepeat Repeat
356hi def link rSpecial SpecialChar
357hi def link rStatement Statement
358hi def link rString String
359hi def link rStrError Error
360hi def link rType Type
Bram Moolenaarcd5c8f82017-04-09 20:11:58 +0200361if g:r_syntax_hl_roxygen
362 hi def link rOTitleTag Operator
363 hi def link rOTag Operator
364 hi def link rOTitleBlock Title
365 hi def link rOBlock Comment
366 hi def link rOBlockNoTitle Comment
Bram Moolenaar77cdfd12016-03-12 12:57:59 +0100367 hi def link rOTitle Title
368 hi def link rOCommentKey Comment
369 hi def link rOExamples SpecialComment
370endif
Bram Moolenaar2c5e8e82015-12-05 20:59:21 +0100371
Bram Moolenaar071d4272004-06-13 20:20:40 +0000372let b:current_syntax="r"
373
374" vim: ts=8 sw=2