[R] Everything You Need for JEdit/R Edit Mode

About this list Date view Thread view Subject view Author view Attachment view

From: Zed Shaw (zedshaw@zedshaw.com)
Date: Wed 24 Apr 2002 - 20:52:20 EST


Message-id: <1019645540.3223.19.camel@workhorse.killnine.net>


After a couple of e-mails asking how to get this to work, I decided that
I would send out a quick message with the stuff you need and
instructions on how to use it.

I've attached the two files you need to get the R syntax coloring and
indenting to work with JEdit. They are just XML files.

Here's what you do:

1) Copy these two files to your .jedit/modes directory. Depending on
what you are running jedit on, this modes directory may be in a
different place. There are two basic modes directories: the jedit one
and yours. The jedit one has lots of XML files already in it. DO NOT
PUT MY FILES IN THIS DIRECTORY!!!!! You will be sorry. The modes
directory you want is probably in your home directory, in the .jedit
directory, and should have nothing in it.

2) Once these files are in there, you'll have to resolve a conflict
between R file endings and REBOL file endings (both *.r in
case-insensitive land). To do this, go to Utilities->Global
Options->Mode-Specific. Select "REBOL" from the pulldown at the top
(look right). Uncheck the, "Use default settings" check box. Change
the "File name glob" to be *.rebol. (NOTE: If, in the rare event that
you actually do both REBOL and R, then you'll have to figure out how to
resolve this another way). Click OK to save the changes.

3) Restart JEdit and try an R file. Everything should be fine. If it
still doesn't work, but words like "to do" are bold, then you didn't
resolve the problem with REBOL files. Try step 2 again.

Most of this was taken from the JEdit help feature, under "Writing Edit
Modes". Take a look at it and see if you can improve on what I have.
Most of what you see is straight out of the R grammar specs, but I'm not
sure what functions in R should be considered keywords. For example,
would you consider "plot" a keyword, or a function.

Anyway, enjoy. And feel free to contact me if you still have problems.








About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Wed 16 Oct 2002 - 11:57:13 EST