Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

35 lines (27 sloc) 1.036 kb
" reStructured Text with R statements
" Language: reST with R code chunks
" Maintainer: Alex Zvoleff, azvoleff@mail.sdsu.edu
" Last Change: Wed Jul 11, 2012 01:46PM
" for portability
if version < 600
syntax clear
elseif exists("b:current_syntax")
finish
endif
" load all of the rst info
runtime syntax/rst.vim
unlet b:current_syntax
" load all of the r syntax highlighting rules into @R
syntax include @R syntax/r.vim
" highlight R chunks
syntax match rrstChunkDelim "^\.\. {r" contained
syntax match rrstChunkDelim "}$" contained
syntax match rrstChunkDelim "^\.\. \.\.$" contained
syntax region rrstChunk start="^\.\. {r.*}$" end="^\.\. \.\.$" contains=@R,rrstChunkDelim keepend transparent fold
" also highlight in-line R code
syntax match rrstInlineDelim "`" contained
syntax match rrstInlineDelim ":r:" contained
syntax region rrstInline start=":r: *`" skip=/\\\\\|\\`/ end="`" contains=@R,rrstInlineDelim keepend
hi def link rrstChunkDelim Special
hi def link rrstInlineDelim Special
let b:current_syntax = "rrst"
Jump to Line
Something went wrong with that request. Please try again.