comparison runtime/syntax/rnoweb.vim @ 836:5a7843c57316 v7.0e02

updated for version 7.0e02
author vimboss
date Tue, 18 Apr 2006 21:55:01 +0000
parents
children 9f279ebda751
comparison
equal deleted inserted replaced
835:8bebcabccc2c 836:5a7843c57316
1 " Vim syntax file
2 " Language: R noweb Files
3 " Maintainer: Johannes Ranke <jranke@uni-bremen.de>
4 " Last Change: 2006 Apr 18
5 " Version: 0.5
6 " SVN: $Id$
7 " Remarks: - This file is inspired by the proposal of
8 " Fernando Henrique Ferraz Pereira da Rosa <feferraz@ime.usp.br>
9 " http://www.ime.usp.br/~feferraz/en/sweavevim.html
10 " - It extends some clusters from syntax/tex.vim (version 33,
11 " March 06 2006) and therefore depends on some contents
12 " of this file
13 "
14
15 " Version Clears: {{{1
16 " For version 5.x: Clear all syntax items
17 " For version 6.x and 7.x: Quit when a syntax file was already loaded
18 if version < 600
19 syntax clear
20 elseif exists("b:current_syntax")
21 finish
22 endif
23
24 syn case match
25
26 " Extension of Tex regions {{{1
27 runtime syntax/tex.vim
28 unlet b:current_syntax
29
30 syn cluster texDocGroup contains=texPartZone,@texPartGroup,@rnoweb
31 syn cluster texPartGroup contains=texChapterZone,texSectionZone,texParaZone,@rnoweb
32 syn cluster texChapterGroup contains=texSectionZone,texParaZone,@rnoweb
33 syn cluster texSectionGroup contains=texSubSectionZone,texParaZone,@rnoweb
34 syn cluster texSubSectionGroup contains=texSubSubSectionZone,texParaZone,@rnoweb
35 syn cluster texSubSubSectionGroup contains=texParaZone,@rnoweb
36 syn cluster texParaGroup contains=texSubParaZone,@rnoweb
37
38 " Highlighting of R code using an existing r.vim syntax file if available {{{1
39 syn include @rnowebR syntax/r.vim
40 syn region rnowebChunk matchgroup=rnowebDelimiter start="^<<.*>>=" matchgroup=rnowebDelimiter end="^@" contains=@rnowebR,rnowebChunkReference,rnowebChunk keepend
41 syn match rnowebChunkReference "^<<.*>>$" contained
42 syn region rnowebSexpr matchgroup=Delimiter start="\\Sexpr{" matchgroup=Delimiter end="}" contains=@rnowebR
43
44 " Sweave options command {{{1
45 syn region rnowebSweaveopts matchgroup=Delimiter start="\\SweaveOpts{" matchgroup=Delimiter end="}"
46
47 " rnoweb Cluster {{{1
48 syn cluster rnoweb contains=rnowebChunk,rnowebChunkReference,rnowebDelimiter,rnowebSexpr,rnowebSweaveopts
49
50 " Highlighting {{{1
51 hi def link rnowebDelimiter Delimiter
52 hi def link rnowebSweaveOpts Statement
53
54 let b:current_syntax = "rnoweb"
55 " vim: foldmethod=marker: