diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2016-05-04 13:56:28 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2016-05-04 13:56:28 -0400 |
| commit | e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b (patch) | |
| tree | e45f71a17c410e456c56de52f94f5c7f95152ad7 /runtime/syntax/r.vim | |
| parent | 490804ed33a5da70ba14bc54bceea5decb62874a (diff) | |
| parent | 6a32852137a3d54131534fe628230eca5311d3fc (diff) | |
| download | rneovim-e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b.tar.gz rneovim-e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b.tar.bz2 rneovim-e2cc3f98fb3ca771d9bd108ae9c37c19bea8025b.zip | |
Merge pull request #4704 from KillTheMule/vim-runtime-patches-all
vim-patch:{a0f849e, d7464be, b4ff518, e392eb4, d042dc8, 2c5e8e8, 256972a, cc7ff3f}
Diffstat (limited to 'runtime/syntax/r.vim')
| -rw-r--r-- | runtime/syntax/r.vim | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/runtime/syntax/r.vim b/runtime/syntax/r.vim index 9677823fb1..e48b6686cb 100644 --- a/runtime/syntax/r.vim +++ b/runtime/syntax/r.vim @@ -3,7 +3,9 @@ " Maintainer: Jakson Aquino <jalvesaq@gmail.com> " Former Maintainers: Vaidotas Zemlys <zemlys@gmail.com> " Tom Payne <tom@tompayne.org> -" Last Change: Wed Dec 31, 2014 12:36AM +" Contributor: Johannes Ranke <jranke@uni-bremen.de> +" Homepage: https://github.com/jalvesaq/R-Vim-runtime +" Last Change: Wed Oct 21, 2015 06:33AM " Filenames: *.R *.r *.Rhistory *.Rt " " NOTE: The highlighting of R functions is defined in @@ -30,16 +32,21 @@ syn case match " Comment syn match rCommentTodo contained "\(BUG\|FIXME\|NOTE\|TODO\):" -syn match rComment contains=@Spell,rCommentTodo "#.*" +syn match rComment contains=@Spell,rCommentTodo,rOBlock "#.*" " Roxygen -syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|include\|docType\)" +syn region rOBlock start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\)\@!" contains=rOTitle,rOKeyword,rOExamples,@Spell keepend +syn region rOTitle start="^\s*\n#\{1,2}' " start="\%^#\{1,2}' " end="^\(#\{1,2}'\s*$\)\@=" contained contains=rOCommentKey +syn match rOCommentKey "#\{1,2}'" containedin=rOTitle contained + +syn region rOExamples start="^#\{1,2}' @examples.*"rs=e+1,hs=e+1 end="^\(#\{1,2}' @.*\)\@=" end="^\(#\{1,2}'\)\@!" contained contains=rOKeyword + +syn match rOKeyword contained "@\(param\|return\|name\|rdname\|examples\|example\|include\|docType\)" syn match rOKeyword contained "@\(S3method\|TODO\|aliases\|alias\|assignee\|author\|callGraphDepth\|callGraph\)" syn match rOKeyword contained "@\(callGraphPrimitives\|concept\|exportClass\|exportMethod\|exportPattern\|export\|formals\)" syn match rOKeyword contained "@\(format\|importClassesFrom\|importFrom\|importMethodsFrom\|import\|keywords\|useDynLib\)" syn match rOKeyword contained "@\(method\|noRd\|note\|references\|seealso\|setClass\|slot\|source\|title\|usage\)" -syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\)" -syn match rOComment contains=@Spell,rOKeyword "#'.*" +syn match rOKeyword contained "@\(family\|template\|templateVar\|description\|details\|inheritParams\|field\)" if &filetype == "rhelp" @@ -202,7 +209,6 @@ hi def link rBoolean Boolean hi def link rBraceError Error hi def link rComment Comment hi def link rCommentTodo Todo -hi def link rOComment Comment hi def link rComplex Number hi def link rConditional Conditional hi def link rConstant Constant @@ -230,6 +236,11 @@ hi def link rString String hi def link rStrError Error hi def link rType Type hi def link rOKeyword Title +hi def link rOBlock Comment +hi def link rOTitle Title +hi def link rOCommentKey Comment +hi def link rOExamples SpecialComment + let b:current_syntax="r" |