[R] RE: [R-gui] NEdit Highligth patterns for R
ernesto at ipimar.pt
Fri Oct 11 11:48:04 CEST 2002
I agree with your comments and of course you identifie the problems
regarding the implementation of your suggestions.
Of course we'd need bidireccional communication to implement it. I think
it's impossible to do it statically.
What I want with NEdit is a very ligth editor (which jedit is not) that
highlights the most important language syntax, so that It becomes easier
to write functions and scripts. I get that with NEdit.
Of course there's a lot that can be further developed and NEdit seems
very flexible and easy to use.
On Fri, 2002-10-11 at 09:00, Philippe Grosjean wrote:
> >I've just submitted to the NEdit development team a R highligth patterns
> >for NEdit (www.nedit.org).
> >NEdit is a text editor for LINUX which I use to write small R functions.
> >In my opinion is a very good tool for small scripts, maybe for huge
> >projects is not the best.
> >I'm attaching the R-5.1.pats file so you can try it.
> >As usual contributions and comments are welcome.
> Nice. But regarding synthax highlighting, I stick with two problems:
> 1) It would be interesting to highlight in different colors functions and
> arguments... but they can have same name. Example: plot(x, col=2) -argument
> 'col' and col(x), function 'col'. For the moment, the only easy way I found
> is to define argument followed by = in the dictionnary, like 'col=' for the
> argument. However, space is allowed between 'col' and '=', and then the
> argument is not correctly coloured. So, I add an automatic correction that
> eliminates spaces before a single '=' sign. But now that '=' is also allowed
> as asignment, it is problematic: col = 1, with 'col' being the name of a
> variable (indeed, col <- 1) is now highlighted as an argument.
> 2) Of course, one could statically define the dictionnary with, let's say,
> all functions and arguments in the base and recommended packages. I would
> prefer a dynamic construction of the dictionnary: when a library is loaded,
> terms are added, when it is unloaded, they are eliminated. This is only
> possible with a bidirectionnal communication between the editor and the R
> calculation kernel. I got this in SciViews but how to do that in Nedit or
> other separate script editors?
> Philippe Grosjean
> ( ( ( ( (
> ) ) ) ) ) Philippe Grosjean
> ( ( ( ( (
> ) ) ) ) ) IFREMER Nantes - DEL/AO
> ( ( ( ( ( rue de l'Ile d'Yeu, BP 21105, 44311 Nantes Cedex 3
> ) ) ) ) ) tel: (33) 02.40.37.42.29, fax: (33) 02.40.37.42.41
> ( ( ( ( ( e-mail: philippe.grosjean at ifremer.fr
> ) ) ) ) )
> ( ( ( ( ( "I'm 100% confident that p is between 0 and 1"
> ) ) ) ) ) L. Gonick & W. Smith (1993)
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help