开发者

Combine syntax highlighting of different Eclipse editors

开发者 https://www.devze.com 2023-04-09 21:57 出处:网络
I use Eclipse, StatET and the Sweave plugin to write my R and Latex code. The cool thing is that R and Latex code can be put together into one file, however you end up with a syntax highlighting probl

I use Eclipse, StatET and the Sweave plugin to write my R and Latex code. The cool thing is that R and Latex code can be put together into one file, however you end up with a syntax highlighting problem.

I have loads of R code and I very much like the Eclipse R syntax highlighting. But now combining R and Latex means that I have to work with .Rnw files where there is no particular syntax highlighting for R.

When I go to Eclipse -> Preferences -> Content Types I can add *.Rnw to "R script file" which make开发者_StackOverflows Eclipse to open the .Rnw files with the standard R Editor. However, this means that I do not have syntax highlighting for Sweave any longer. In addition, the Sweave code is shown as an error in the R editor.

My question is whether it is possible to combine different syntax highlighting styles in an easy way?


I don't think any Eclipse plugins/editors really support mixing up several syntaxes inside one editor. At any rate it is not currently supported in Eclipse Platform.

However you can try Eclipse Colorer plugin. It allows to switch coloring style for the current editor. It may mot support both R and Latex syntax, but you can create your own highlighting by adding your own HRC file.

0

精彩评论

暂无评论...
验证码 换一张
取 消