diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-04-18 21:55:01 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-04-18 21:55:01 +0000 |
commit | c1e37901fc8486c9960d7290e521ba51e292e94b (patch) | |
tree | 5367e8f83d9d313dd73c0499fd310f57df5e605f /runtime/syntax/rnoweb.vim | |
parent | a93fa7ee7856b54d3778e613c7b7e4b76aaeb2af (diff) | |
download | vim-git-c1e37901fc8486c9960d7290e521ba51e292e94b.tar.gz |
updated for version 7.0e02v7.0e02
Diffstat (limited to 'runtime/syntax/rnoweb.vim')
-rw-r--r-- | runtime/syntax/rnoweb.vim | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/runtime/syntax/rnoweb.vim b/runtime/syntax/rnoweb.vim new file mode 100644 index 000000000..7a106ecb9 --- /dev/null +++ b/runtime/syntax/rnoweb.vim @@ -0,0 +1,55 @@ +" Vim syntax file +" Language: R noweb Files +" Maintainer: Johannes Ranke <jranke@uni-bremen.de> +" Last Change: 2006 Apr 18 +" Version: 0.5 +" SVN: $Id$ +" Remarks: - This file is inspired by the proposal of +" Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br> +" http://www.ime.usp.br/~feferraz/en/sweavevim.html +" - It extends some clusters from syntax/tex.vim (version 33, +" March 06 2006) and therefore depends on some contents +" of this file +" + +" Version Clears: {{{1 +" For version 5.x: Clear all syntax items +" For version 6.x and 7.x: Quit when a syntax file was already loaded +if version < 600 + syntax clear +elseif exists("b:current_syntax") + finish +endif + +syn case match + +" Extension of Tex regions {{{1 +runtime syntax/tex.vim +unlet b:current_syntax + +syn cluster texDocGroup contains=texPartZone,@texPartGroup,@rnoweb +syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone,@rnoweb +syn cluster texChapterGroup contains=texSectionZone,texParaZone,@rnoweb +syn cluster texSectionGroup contains=texSubSectionZone,texParaZone,@rnoweb +syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone,@rnoweb +syn cluster texSubSubSectionGroup contains=texParaZone,@rnoweb +syn cluster texParaGroup contains=texSubParaZone,@rnoweb + +" Highlighting of R code using an existing r.vim syntax file if available {{{1 +syn include @rnowebR syntax/r.vim +syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk keepend +syn match rnowebChunkReference "^<<.*>>$" contained +syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR + +" Sweave options command {{{1 +syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}" + +" rnoweb Cluster {{{1 +syn cluster rnoweb contains=rnowebChunk,rnowebChunkReference,rnowebDelimiter,rnowebSexpr,rnowebSweaveopts + +" Highlighting {{{1 +hi def link rnowebDelimiter Delimiter +hi def link rnowebSweaveOpts Statement + +let b:current_syntax = "rnoweb" +" vim: foldmethod=marker: |