Syntax highlighting rules and definitions

橙三吉。 提交于 2019-12-22 03:41:29

问题


Are there any standard syntax highlighting rules for R? If yes, where can they be found?

Or does each editor, IDE, package (e.g., the highlight package) create their own rule set?


回答1:


Each editor creates their own rule set. For historical reasons, each editor has implemented syntax highlighting in its own way. Having a cross-editor standard may be possible using, for example, GeSHi, but it would almost certainly require a lot of effort getting editor makers to sign up to it, especially if they already have their own system.

Eclipse uses .hrc files for storing syntax information.
RStudio has a file called r_highlight.html.
Notepad++ stores keywords for different languages in a file named langs.model.xml.
Textpad has its own .syn format for the code highlighting.
TextWrangler has a plugin.



来源:https://stackoverflow.com/questions/19999687/syntax-highlighting-rules-and-definitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!