diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-06 18:54:19 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-06 18:54:19 +0200 |
commit | bc9757916ed09763d96283ee62dbed58bd713a11 (patch) | |
tree | 07fbb58e9a4f4cbf5206d89f61e4d570e64d2c1a /syntax/rnoweb-1.vim | |
parent | c6fa4d2bf5eb5301f4d3f123031cf34839a5508d (diff) | |
download | vim-polyglot-bc9757916ed09763d96283ee62dbed58bd713a11.tar.gz vim-polyglot-bc9757916ed09763d96283ee62dbed58bd713a11.zip |
Add all vim filetypes
Diffstat (limited to 'syntax/rnoweb-1.vim')
-rw-r--r-- | syntax/rnoweb-1.vim | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/syntax/rnoweb-1.vim b/syntax/rnoweb-1.vim new file mode 100644 index 00000000..f3058c7e --- /dev/null +++ b/syntax/rnoweb-1.vim @@ -0,0 +1,60 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'r-lang') == -1 + +" Vim syntax file +" Language: R noweb Files +" Maintainer: Johannes Ranke <jranke@uni-bremen.de> +" Last Change: 2007 Mär 30 +" Version: 0.8 +" SVN: $Id: rnoweb.vim 69 2007-03-30 08:55:36Z ranke $ +" 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 +" + +" 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 clusters {{{1 +runtime syntax/tex.vim +unlet b:current_syntax + +syn cluster texMatchGroup add=@rnoweb +syn cluster texEnvGroup add=@rnoweb +syn cluster texFoldGroup add=@rnoweb +syn cluster texDocGroup add=@rnoweb +syn cluster texPartGroup add=@rnoweb +syn cluster texChapterGroup add=@rnoweb +syn cluster texSectionGroup add=@rnoweb +syn cluster texSubSectionGroup add=@rnoweb +syn cluster texSubSubSectionGroup add=@rnoweb +syn cluster texParaGroup add=@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 fold 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 +hi def link rnowebChunkReference Delimiter + +let b:current_syntax = "rnoweb" +" vim: foldmethod=marker: + +endif |