Sublime Forum

knitR and Sweave syntax highlighting

#1

Hello! I am a newbie in both Mac OS X and Sublime. I wonder how can I make better highlighting of knitR/Sweave code in Sublime? This, in principle, could be sufficient: use basic LaTeX highlighting, but ignore everything that is between “<<” and “@”. knitR combines LaTeX and R snippets, which are enclosed like this:

<<NAME_OF_THIS_SNIPPET>>=
x = 0 # stupid R executable
@

Since it often contains “$”, things can get ugly.

Many thanks,
PM

0 Likes