annotate runtime/syntax/r.vim @ 3306:ded8f5add04c v7.3.420

updated for version 7.3.420 Problem: "it" and "at" don't work properly with a dash in the tag name. Solution: Require a space to match the tag name. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Thu, 26 Jan 2012 20:58:26 +0100
parents 6f63330ec225
children 605c9ce57ec3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
2 " Language: R (GNU S)
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
3 " Maintainer: Jakson Aquino <jalvesaq@gmail.com>
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
4 " Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com>
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
5 " Tom Payne <tom@tompayne.org>
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
6 " Last Change: Sun Feb 20, 2011 12:06PM
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
7 " Filenames: *.R *.r *.Rhistory *.Rt
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
8 "
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
9 " NOTE: The highlighting of R functions is defined in the
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
10 " r-plugin/functions.vim, which is part of vim-r-plugin2:
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
11 " http://www.vim.org/scripts/script.php?script_id=2628
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
12 "
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
13 " CONFIGURATION:
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
14 " syntax folding can be turned on by
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
15 "
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
16 " let r_syntax_folding = 1
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
17 "
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
18 " Some lines of code were borrowed from Zhuojun Chen.
625
81fe2ccc1207 updated for version 7.0179
vimboss
parents: 7
diff changeset
19
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
20 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
24 setlocal iskeyword=@,48-57,_,.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
26 if exists("g:r_syntax_folding")
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
27 setlocal foldmethod=syntax
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
28 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
29
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Comment
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
33 syn match rComment contains=@Spell "\#.*"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
35 if &filetype == "rhelp"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
36 " string enclosed in double quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
37 syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
38 " string enclosed in single quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
39 syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
40 else
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
41 " string enclosed in double quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
42 syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
43 " string enclosed in single quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
44 syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
45 endif
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
46
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
47 syn match rStrError display contained "\\."
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
48
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
49
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
50 " New line, carriage return, tab, backspace, bell, feed, vertical tab, backslash
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
51 syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
53 " Hexadecimal and Octal digits
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
54 syn match rSpecial display contained "\\\(x\x\{1,2}\|[0-8]\{1,3}\)"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
55
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
56 " Unicode characters
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
57 syn match rSpecial display contained "\\u\x\{1,4}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
58 syn match rSpecial display contained "\\U\x\{1,8}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
59 syn match rSpecial display contained "\\u{\x\{1,4}}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
60 syn match rSpecial display contained "\\U{\x\{1,8}}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
61
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword rStatement break next return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword rConditional if else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword rRepeat for in repeat while
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
67 " Constant (not really)
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
68 syn keyword rConstant T F LETTERS letters month.ab month.name pi
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
69 syn keyword rConstant R.version.string
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
70
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
71 syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
72
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
73 " Constants
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword rConstant NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword rBoolean FALSE TRUE
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
76 syn keyword rNumber NA Inf NaN
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
77
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
78 " integer
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
79 syn match rInteger "\<\d\+L"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
80 syn match rInteger "\<0x\([0-9]\|[a-f]\|[A-F]\)\+L"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
81 syn match rInteger "\<\d\+[Ee]+\=\d\+L"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
82
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
83 " number with no fractional part or exponent
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
84 syn match rNumber "\<\d\+\>"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
85 " hexadecimal number
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
86 syn match rNumber "\<0x\([0-9]\|[a-f]\|[A-F]\)\+"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
87
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
88 " floating point number with integer and fractional parts and optional exponent
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
89 syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\="
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
90 " floating point number with no integer part and optional exponent
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
91 syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\="
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
92 " floating point number with no fractional part and optional exponent
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
93 syn match rFloat "\<\d\+[Ee][-+]\=\d\+"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
94
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
95 " complex number
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
96 syn match rComplex "\<\d\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
97 syn match rComplex "\<\d\++\d\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
98 syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
99 syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
100 syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
101 syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
102
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
103 syn match rOperator "&"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
104 syn match rOperator '-'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
105 syn match rOperator '*'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
106 syn match rOperator '+'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
107 syn match rOperator '='
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
108 syn match rOperator "[|!<>^~`/:@]"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
109 syn match rOperator "%\{2}\|%\*%\|%\/%\|%in%\|%o%\|%x%"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
110 syn match rOpError '*\{3}'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
111 syn match rOpError '//'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
112 syn match rOpError '&&&'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
113 syn match rOpError '|||'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
114 syn match rOpError '<<'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
115 syn match rOpError '>>'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
116
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
117 syn match rArrow "<\{1,2}-"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
118 syn match rArrow "->\{1,2}"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 " Special
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
121 syn match rDelimiter "[,;:]"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 " Error
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
124 if exists("g:r_syntax_folding")
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
125 syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError fold
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
126 syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError fold
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
127 syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError fold
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
128 else
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
129 syn region rRegion matchgroup=Delimiter start=/(/ matchgroup=Delimiter end=/)/ transparent contains=ALLBUT,rError,rBraceError,rCurlyError
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
130 syn region rRegion matchgroup=Delimiter start=/{/ matchgroup=Delimiter end=/}/ transparent contains=ALLBUT,rError,rBraceError,rParenError
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
131 syn region rRegion matchgroup=Delimiter start=/\[/ matchgroup=Delimiter end=/]/ transparent contains=ALLBUT,rError,rCurlyError,rParenError
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
132 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
133
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
134 syn match rError "[)\]}]"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
135 syn match rBraceError "[)}]" contained
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
136 syn match rCurlyError "[)\]]" contained
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
137 syn match rParenError "[\]}]" contained
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
138
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
139 " Source list of R functions. The list is produced by the Vim-R-plugin
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
140 " http://www.vim.org/scripts/script.php?script_id=2628
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
141 runtime r-plugin/functions.vim
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
142
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
143 syn match rDollar display contained "\$"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
144
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
145 " List elements will not be highlighted as functions:
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
146 syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
147
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
148 " Functions that may add new objects
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
149 syn keyword rPreProc library require attach detach source
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
150
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
151 if &filetype == "rhelp"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
152 syn match rHelpIdent '\\method'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
153 syn match rHelpIdent '\\S4method'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
154 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
155
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
156 " Type
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
157 syn keyword rType array category character complex double function integer list logical matrix numeric vector data.frame
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
159 " Name of object with spaces
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
160 syn region rNameWSpace start="`" end="`"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
161
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
162 if &filetype == "rhelp"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
163 syn match rhPreProc "^#ifdef.*"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
164 syn match rhPreProc "^#endif.*"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
165 syn match rhSection "\\dontrun\>"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
166 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
167
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 " Define the default highlighting.
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
169 hi def link rArrow Statement
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
170 hi def link rBoolean Boolean
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
171 hi def link rBraceError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
172 hi def link rComment Comment
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
173 hi def link rComplex Number
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
174 hi def link rConditional Conditional
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
175 hi def link rConstant Constant
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
176 hi def link rCurlyError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
177 hi def link rDelimiter Delimiter
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
178 hi def link rDollar SpecialChar
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
179 hi def link rError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
180 hi def link rFloat Float
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
181 hi def link rFunction Function
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
182 hi def link rHelpIdent Identifier
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
183 hi def link rhPreProc PreProc
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
184 hi def link rhSection PreCondit
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
185 hi def link rInteger Number
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
186 hi def link rLstElmt Normal
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
187 hi def link rNameWSpace Normal
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
188 hi def link rNumber Number
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
189 hi def link rOperator Operator
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
190 hi def link rOpError Error
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
191 hi def link rParenError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
192 hi def link rPreProc PreProc
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
193 hi def link rRepeat Repeat
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
194 hi def link rSpecial SpecialChar
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
195 hi def link rStatement Statement
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
196 hi def link rString String
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
197 hi def link rStrError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
198 hi def link rType Type
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 let b:current_syntax="r"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 " vim: ts=8 sw=2