[jedit:feature-requests] #557 Support syntax highlighting for R
goebbe via jEdit-devel <[email protected]> Tue, 14 Apr 2026 12:05:08 -0000
| Newsgroups | gmane.editors.jedit.devel |
|---|---|
| Message-ID | </p/jedit/feature-requests/557/3746334778e1280012ab20aff3ffe00d01dfe111.feature-requests@jedit.p.sourceforge.net> |
This is a multi-part message in MIME format.
--===============2149194987477024643==
Content-Type: multipart/related; boundary="===============8978316711982053290=="
This is a multi-part message in MIME format.
--===============8978316711982053290==
Content-Type: multipart/alternative; boundary="===============1314713765838571148=="
MIME-Version: 1.0
--===============1314713765838571148==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
The attached update for the syntax-highlighting file
introduces the following changes:
- "_" is removed from "wordBreakChars", instead
- "_" is now INVALID AT_WORD_START
- "%" is removed from SEQ TYPE= "OPERATOR", instead
- "%" is now SPAN TYPE="OPERATOR" for %in% or %>% ...
- DIGITS now also work for
- Integer digits: 1L, 55L
- scientific notation: 1e5 , 2.5e-3
- complex numbers: 1+4i, 9 + 3i
- FUNCTION names are highlighted if they contain "." e.g.: is.na() as.data.frame()
- KEYWORDS for TRUE, FALSE
- KEYWORDS for null-able values: NULL, NA, NaN, Inf
Attachments:
- [rlang.xml](https://sourceforge.net/p/jedit/feature-requests/_discuss/thread/c96acc3774/b9be/attachment/rlang.xml) (3.7 kB; text/xml)
---
**[feature-requests:#557] Support syntax highlighting for R **
**Status:** open
**Group:** none
**Created:** Mon Apr 13, 2026 02:20 PM UTC by goebbe
**Last Updated:** Mon Apr 13, 2026 02:21 PM UTC
**Owner:** nobody
**Attachments:**
- [rlang.xml](https://sourceforge.net/p/jedit/feature-requests/557/attachment/rlang.xml) (2.4 kB; text/xml)
This is a feature request for supporting **syntax highlighting for R.**
R is a popular language for statistical analysis: https://www.r-project.org/about.html
R-programs use the **.R** or** .r** suffix.
In Jedit 5.5 (LinuxMint), this suffix is used for rebol-language.
However, 13 years ago, in 2013, rebol moved from .r to .reb as a new standard for suffixes:
https://www.rebol.com/article/0540.html
I use the following mode entry for R:
~~~xml
<MODE NAME="rlang" FILE="rlang.xml"
FILE_NAME_GLOB="*.{r,R}" />
~~~
The old rebol entry in the catalog file should probably be changed to:
~~~xml
<MODE NAME="rebol" FILE="rebol.xml"
FILE_NAME_GLOB="*.reb" />
~~~
With respect to its syntax, R-lang has strong resemblance to S and Splus.
For my personnel use, I just copied/ pasted the splus.xml syntax file, renamed it to rlang.xml and commented one single line. (For the use of "_" which is allowed in R, but not in Splus)
I use this syntax highlighting successfully with different R-projects and didn't spot any problems.
Best regards.
---
Sent from sourceforge.net because [email protected] is subscribed to https://sourceforge.net/p/jedit/feature-requests/
To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/jedit/admin/feature-requests/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.
--===============1314713765838571148==
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit
<div class="markdown_content"><p>The attached update for the syntax-highlighting file <br/>
introduces the following changes: </p>
<ul>
<li>"_" is removed from "wordBreakChars", instead</li>
<li>"_" is now INVALID AT_WORD_START</li>
<li>"%" is removed from SEQ TYPE= "OPERATOR", instead</li>
<li>"%" is now SPAN TYPE="OPERATOR" for %in% or %>% ...</li>
<li>DIGITS now also work for</li>
<li>Integer digits: 1L, 55L</li>
<li>scientific notation: 1e5 , 2.5e-3</li>
<li>complex numbers: 1+4i, 9 + 3i</li>
<li>FUNCTION names are highlighted if they contain "." e.g.: is.na() as.data.frame()</li>
<li>KEYWORDS for TRUE, FALSE</li>
<li>KEYWORDS for null-able values: NULL, NA, NaN, Inf</li>
</ul>
<p>Attachments:</p>
<ul>
<li><a href="https://sourceforge.net/p/jedit/feature-requests/_discuss/thread/c96acc3774/b9be/attachment/rlang.xml">rlang.xml</a> (sourceforge.net) (3.7 kB; text/xml)</li>
</ul>
<hr/>
<p>**<a class="alink" href="https://sourceforge.net/p/jedit/feature-requests/557/">[feature-requests:#557]</a> Support syntax highlighting for R **</p>
<p><strong>Status:</strong> open<br/>
<strong>Group:</strong> none<br/>
<strong>Created:</strong> Mon Apr 13, 2026 02:20 PM UTC by goebbe<br/>
<strong>Last Updated:</strong> Mon Apr 13, 2026 02:21 PM UTC<br/>
<strong>Owner:</strong> nobody<br/>
<strong>Attachments:</strong></p>
<ul>
<li><a href="https://sourceforge.net/p/jedit/feature-requests/557/attachment/rlang.xml">rlang.xml</a> (sourceforge.net) (2.4 kB; text/xml)</li>
</ul>
<p>This is a feature request for supporting <strong>syntax highlighting for R.</strong><br/>
R is a popular language for statistical analysis: <a href="https://www.r-project.org/about.html" rel="nofollow">https://www.r-project.org/about.html</a></p>
<p>R-programs use the <strong>.R</strong> or<strong> .r</strong> suffix. <br/>
In Jedit 5.5 (LinuxMint), this suffix is used for rebol-language. </p>
<p>However, 13 years ago, in 2013, rebol moved from .r to .reb as a new standard for suffixes: <br/>
<a href="https://www.rebol.com/article/0540.html" rel="nofollow">https://www.rebol.com/article/0540.html</a></p>
<p>I use the following mode entry for R: </p>
<div class="codehilite"><pre><span></span><code><span class="nt"><MODE</span><span class="w"> </span><span class="na">NAME=</span><span class="s">"rlang"</span><span class="w"> </span><span class="na">FILE=</span><span class="s">"rlang.xml"</span>
<span class="w"> </span><span class="na">FILE_NAME_GLOB=</span><span class="s">"*.{r,R}"</span><span class="w"> </span><span class="nt">/></span>
</code></pre></div>
<p>The old rebol entry in the catalog file should probably be changed to: </p>
<div class="codehilite"><pre><span></span><code><span class="nt"><MODE</span><span class="w"> </span><span class="na">NAME=</span><span class="s">"rebol"</span><span class="w"> </span><span class="na">FILE=</span><span class="s">"rebol.xml"</span>
<span class="w"> </span><span class="na">FILE_NAME_GLOB=</span><span class="s">"*.reb"</span><span class="w"> </span><span class="nt">/></span>
</code></pre></div>
<p>With respect to its syntax, R-lang has strong resemblance to S and Splus. <br/>
For my personnel use, I just copied/ pasted the splus.xml syntax file, renamed it to rlang.xml and commented one single line. (For the use of "_" which is allowed in R, but not in Splus) </p>
<p>I use this syntax highlighting successfully with different R-projects and didn't spot any problems. </p>
<p>Best regards.</p>
<hr/>
<p>Sent from sourceforge.net because [email protected] is subscribed to <a href="https://sourceforge.net/p/jedit/feature-requests/">https://sourceforge.net/p/jedit/feature-requests/</a></p>
<p>To unsubscribe from further messages, a project admin can change settings at <a href="https://sourceforge.net/p/jedit/admin/feature-requests/options.">https://sourceforge.net/p/jedit/admin/feature-requests/options.</a> Or, if this is a mailing list, you can unsubscribe from the mailing list.</p></div>
--===============1314713765838571148==--
--===============8978316711982053290==--
--===============2149194987477024643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============2149194987477024643==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
-----------------------------------------------
jEdit Developers' List
[email protected]
https://lists.sourceforge.net/lists/listinfo/jedit-devel
--===============2149194987477024643==--