FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Vim-R-plugin/syntax/rdoc.vim at master · vim-scripts/Vim-R-plugin · GitHub
vim-scripts
/
Vim-R-plugin
Public
Notifications
You must be signed in to change notification settings
Fork
57
Star
121
Code
Pull requests
3
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Vim-R-plugin
/
syntax
/
rdoc.vim
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (51 loc) · 2.57 KB
Breadcrumbs
Vim-R-plugin
/
syntax
/
rdoc.vim
Copy path
File metadata and controls
65 lines (51 loc) · 2.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
"
Vim syntax file
"
Language:
R documentation
"
Maintainer:
Jakson A. Aquino <jalvesaq@gmail.com>
if
exists
(
"
b:current_syntax
"
)
finish
endif
setlocal
iskeyword
=
@
,
48
-
57
,_,.
if
!
exists
(
"
rdoc_minlines
"
)
let
rdoc_minlines
=
200
endif
if
!
exists
(
"
rdoc_maxlines
"
)
let
rdoc_maxlines
=
2
*
rdoc_minlines
endif
exec
"
syn sync minlines=
"
. rdoc_minlines .
"
maxlines=
"
. rdoc_maxlines
syn
match
rdocTitle
"
^[A-Z].*:$
"
syn
match
rdocTitle
"
^
\S
.*R Documentation$
"
syn
match
rdocFunction
"
\(
[A-Z]
\|
[a-z]
\|\.\|
_
\)\(
[A-Z]
\|
[a-z]
\|
[0-9]
\|\.\|
_
\)
*
"
contained
syn
region
rdocStringS
start
=
"
\%
u2018
"
end
=
"
\%
u2019
"
contains
=
rdocFunction
transparent
keepend
syn
region
rdocStringS
start
=
"
\%
x91
"
end
=
"
\%
x92
"
contains
=
rdocFunction
transparent
keepend
syn
region
rdocStringD
start
=
'
"
'
skip
=
'
\\
"
'
end
=
'
"
'
syn
match
rdocURL
`
\v
<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*
\.
[a-z0-9._-]+
\.
[^' <>"]+)[a-zA-Z0-9/]
`
syn
keyword
rdocNote
note Note NOTE note: Note: NOTE: Notes Notes:
"
When using vim as R pager to see the output of help.search():
syn
region
rdocPackage
start
=
"
^[A-Za-z]
\S
*::
"
end
=
"
[
\s\r
]
"
contains
=
rdocPackName,rdocFuncName
transparent
syn
match
rdocPackName
"
^[A-Za-z][A-Za-z0-9
\.
]*
"
contained
syn
match
rdocFuncName
"
::[A-Za-z0-9
\.\-
_]*
"
contained
syn
region
rdocArgReg
matchgroup
=
rdocArgTitle
start
=
"
^Arguments:
"
matchgroup
=
NONE
end
=
"
^
\t
"
contains
=
rdocArgItems,rdocArgTitle,rdocPackage,rdocFuncName,rdocStringS
keepend
transparent
syn
match
rdocArgItems
"
\n\n\s
*
\(
[A-Z]
\|
[a-z]
\|
[0-9]
\|\.\|
_
\)
*:
"
contains
=
rdocArg
contained
transparent
syn
match
rdocArg
"
\(
[A-Z]
\|
[a-z]
\|
[0-9]
\|\.\|
_
\)
*
"
contained
syn
include
@rdocR
syntax/r.vim
syn
region
rdocExample
matchgroup
=
rdocExTitle
start
=
"
^Examples:$
"
matchgroup
=
rdocExEnd
end
=
'
^###$
'
contains
=
@rdocR
keepend
syn
region
rdocUsage
matchgroup
=
rdocTitle
start
=
"
^Usage:$
"
matchgroup
=
NONE
end
=
'
^
\t
'
contains
=
@rdocR
syn
sync
match
rdocSyncExample
grouphere
rdocExample
"
^Examples:$
"
syn
sync
match
rdocSyncUsage
grouphere
rdocUsage
"
^Usage:$
"
syn
sync
match
rdocSyncArg
grouphere
rdocArgReg
"
^Arguments:
"
syn
sync
match
rdocSyncNONE
grouphere
NONE
"
^
\t
$
"
"
Define the default highlighting.
"
hi def link rdocArgReg Statement
hi
def
link
rdocTitle
Title
hi
def
link
rdocArgTitle
Title
hi
def
link
rdocExTitle
Title
hi
def
link
rdocExEnd
Comment
hi
def
link
rdocFunction
Function
hi
def
link
rdocStringD
String
hi
def
link
rdocURL
HtmlLink
hi
def
link
rdocArg
Special
hi
def
link
rdocNote
Todo
hi
def
link
rdocPackName
Title
hi
def
link
rdocFuncName
Function
let
b:
current_syntax
=
"
rdoc
"
"
vim:
ts
=
8
sw
=
4
Back
|
FazBrowse Home
|
New Git URL