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="^@" contai...@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
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to