annotate runtime/syntax/r.vim @ 5106:c3a82208e143 v7.3.1296

updated for version 7.3.1296 Problem: Only MS-Windows limits the GUI window size to what fits on the monitor. Solution: Limit the size for all systems. (Daniel Harding)
author Bram Moolenaar <bram@vim.org>
date Wed, 03 Jul 2013 16:58:44 +0200
parents 2b11ac90d9e9
children 0efec12f52ac
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>
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
6 " Last Change: Sun May 19, 2013 05:59PM
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
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
33 syn match rComment contains=@Spell "#.*"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
34
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
35 " Roxygen
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
36 syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
37 syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
38 syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
39 syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\)"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
40 syn match rOKeyword contained "@\(method\|nord\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
41 syn match rOComment contains=@Spell,rOKeyword "#'.*"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
42
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
44 if &filetype == "rhelp"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
45 " string enclosed in double quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
46 syn region rString contains=rSpecial,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
47 " string enclosed in single quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
48 syn region rString contains=rSpecial,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
49 else
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
50 " string enclosed in double quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
51 syn region rString contains=rSpecial,rStrError,@Spell start=/"/ skip=/\\\\\|\\"/ end=/"/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
52 " string enclosed in single quotes
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
53 syn region rString contains=rSpecial,rStrError,@Spell start=/'/ skip=/\\\\\|\\'/ end=/'/
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
54 endif
2608
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 syn match rStrError display contained "\\."
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
57
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
58
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
59 " 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
60 syn match rSpecial display contained "\\\(n\|r\|t\|b\|a\|f\|v\|'\|\"\)\|\\\\"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
62 " Hexadecimal and Octal digits
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
63 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
64
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
65 " Unicode characters
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
66 syn match rSpecial display contained "\\u\x\{1,4}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
67 syn match rSpecial display contained "\\U\x\{1,8}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
68 syn match rSpecial display contained "\\u{\x\{1,4}}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
69 syn match rSpecial display contained "\\U{\x\{1,8}}"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
70
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword rStatement break next return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword rConditional if else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword rRepeat for in repeat while
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
76 " Constant (not really)
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
77 syn keyword rConstant T F LETTERS letters month.abb month.name pi
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
78 syn keyword rConstant R.version.string
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
79
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
80 syn keyword rNumber NA_integer_ NA_real_ NA_complex_ NA_character_
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
81
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
82 " Constants
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword rConstant NULL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword rBoolean FALSE TRUE
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
85 syn keyword rNumber NA Inf NaN
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
86
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
87 " integer
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
88 syn match rInteger "\<\d\+L"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
89 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
90 syn match rInteger "\<\d\+[Ee]+\=\d\+L"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
91
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
92 " number with no fractional part or exponent
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
93 syn match rNumber "\<\d\+\>"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
94 " hexadecimal number
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
95 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
96
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
97 " 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
98 syn match rFloat "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\="
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
99 " 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
100 syn match rFloat "\<\.\d\+\([Ee][-+]\=\d\+\)\="
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
101 " 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
102 syn match rFloat "\<\d\+[Ee][-+]\=\d\+"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
103
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
104 " complex number
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
105 syn match rComplex "\<\d\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
106 syn match rComplex "\<\d\++\d\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
107 syn match rComplex "\<0x\([0-9]\|[a-f]\|[A-F]\)\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
108 syn match rComplex "\<\d\+\.\d*\([Ee][-+]\=\d\+\)\=i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
109 syn match rComplex "\<\.\d\+\([Ee][-+]\=\d\+\)\=i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
110 syn match rComplex "\<\d\+[Ee][-+]\=\d\+i"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
111
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
112 syn match rOperator "&"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
113 syn match rOperator '-'
4502
605c9ce57ec3 Updated runtime files, language files and translations.
Bram Moolenaar <bram@vim.org>
parents: 2725
diff changeset
114 syn match rOperator '\*'
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
115 syn match rOperator '+'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
116 syn match rOperator '='
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
117 if &filetype != "rmd" && &filetype != "rrst"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
118 syn match rOperator "[|!<>^~/:]"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
119 else
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
120 syn match rOperator "[|!<>^~`/:]"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
121 endif
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
122 syn match rOperator "%\{2}\|%\S*%"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
123 syn match rOpError '\*\{3}'
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
124 syn match rOpError '//'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
125 syn match rOpError '&&&'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
126 syn match rOpError '|||'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
127 syn match rOpError '<<'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
128 syn match rOpError '>>'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
129
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
130 syn match rArrow "<\{1,2}-"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
131 syn match rArrow "->\{1,2}"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 " Special
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
134 syn match rDelimiter "[,;:]"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 " Error
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
137 if exists("g:r_syntax_folding")
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
138 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
139 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
140 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
141 else
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
142 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
143 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
144 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
145 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
146
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
147 syn match rError "[)\]}]"
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
148 syn match rBraceError "[)}]" contained
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
149 syn match rCurlyError "[)\]]" contained
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
150 syn match rParenError "[\]}]" contained
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
151
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
152 " 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
153 " http://www.vim.org/scripts/script.php?script_id=2628
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
154 runtime r-plugin/functions.vim
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
155
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
156 syn match rDollar display contained "\$"
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
157 syn match rDollar display contained "@"
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
158
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
159 " List elements will not be highlighted as functions:
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
160 syn match rLstElmt "\$[a-zA-Z0-9\\._]*" contains=rDollar
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
161 syn match rLstElmt "@[a-zA-Z0-9\\._]*" contains=rDollar
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
162
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
163 " Functions that may add new objects
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
164 syn keyword rPreProc library require attach detach source
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
165
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
166 if &filetype == "rhelp"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
167 syn match rHelpIdent '\\method'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
168 syn match rHelpIdent '\\S4method'
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
169 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
170
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
171 " Type
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
172 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
173
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
174 " Name of object with spaces
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
175 if &filetype != "rmd" && &filetype != "rrst"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
176 syn region rNameWSpace start="`" end="`"
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
177 endif
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
178
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
179 if &filetype == "rhelp"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
180 syn match rhPreProc "^#ifdef.*"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
181 syn match rhPreProc "^#endif.*"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
182 syn match rhSection "\\dontrun\>"
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
183 endif
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
184
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 " Define the default highlighting.
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
186 hi def link rArrow Statement
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
187 hi def link rBoolean Boolean
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
188 hi def link rBraceError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
189 hi def link rComment Comment
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
190 hi def link rOComment Comment
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
191 hi def link rComplex Number
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
192 hi def link rConditional Conditional
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
193 hi def link rConstant Constant
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
194 hi def link rCurlyError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
195 hi def link rDelimiter Delimiter
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
196 hi def link rDollar SpecialChar
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
197 hi def link rError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
198 hi def link rFloat Float
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
199 hi def link rFunction Function
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
200 hi def link rHelpIdent Identifier
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
201 hi def link rhPreProc PreProc
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
202 hi def link rhSection PreCondit
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
203 hi def link rInteger Number
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
204 hi def link rLstElmt Normal
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
205 hi def link rNameWSpace Normal
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
206 hi def link rNumber Number
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
207 hi def link rOperator Operator
2725
6f63330ec225 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2608
diff changeset
208 hi def link rOpError Error
2608
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
209 hi def link rParenError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
210 hi def link rPreProc PreProc
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
211 hi def link rRepeat Repeat
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
212 hi def link rSpecial SpecialChar
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
213 hi def link rStatement Statement
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
214 hi def link rString String
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
215 hi def link rStrError Error
7d8af31066c8 Updated runtime files and translations.
Bram Moolenaar <bram@vim.org>
parents: 856
diff changeset
216 hi def link rType Type
4780
2b11ac90d9e9 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 4502
diff changeset
217 hi def link rOKeyword Title
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
218
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
219 let b:current_syntax="r"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
220
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
221 " vim: ts=8 sw=2