Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

51 lines (40 sloc) 1.72 kB
" Vim syntax file
" Language: Test version of R documentation
" Maintainer: Jakson A. Aquino <>
if exists("b:current_syntax")
if !exists("rdoc_minlines")
let rdoc_minlines = 200
if !exists("rdoc_maxlines")
let rdoc_maxlines = 2 * rdoc_minlines
exec "syn sync minlines=" . rdoc_minlines . " maxlines=" . rdoc_maxlines
syn match rdocTitle "^[A-Z].*:"
syn match rdocTitle "^\S.*R Documentation$"
syn region rdocStringS start="‘" end="’"
syn region rdocStringS start="‘" end="’"
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:
syn match rdocArg "^\s*\([a-z]\|[A-Z]\|[0-9]\|\.\)*: "
syn include @rdocR syntax/r.vim
syn region rdocExample matchgroup=rdocExTitle start="^Examples:$" matchgroup=rdocExEnd end='^###$' contains=@rdocR keepend
" When using vim as R pager to see the output of
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
" Define the default highlighting.
hi def link rdocTitle Title
hi def link rdocExTitle Title
hi def link rdocExEnd Comment
hi def link rdocStringS 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 sts=2 sw=2:
Jump to Line
Something went wrong with that request. Please try again.