[Vim-latex-devel] modifying latex-suite syntax highlighting for Sweave (Rnw) files
Brought to you by:
srinathava,
tmaas
From: abr <all...@gm...> - 2010-09-24 18:52:14
|
Hi folks, Is there some easy way to tweak the syntax highlighting of latex-suite so it will ignore Sweave/R code chunks embedded in LaTeX having the form: <<echo=T>>== # R code, often with "$"s which play havoc with syntax highlighting x <- rnorm(10) @ I know there are a handful of other people struggling with this problem, see http://stackoverflow.com/questions/1504318/associate-rnw-with-vim-latex-suite The solution proposed here [ http://feferraz.net/en/P/Sweave_Syntax_Highlighting_in_vim] works but it doesn't seem compatible with latex-suite. It creates the following after/syntax/noweb.vim file runtime! syntax/tex.vim unlet b:current_syntax syntax include @nowebR syntax/r.vim syntax region nowebChunk start="^<<.*>>=" end="^@" contains=@nowebR syntax region Sexpr start="\\Sexpr{" end="}" keepend hi Sexpr gui=bold guifg=chocolate2 let b:current_syntax="noweb" Any thoughts? Suggestions? cheers, Allen Riddell |