[TxMt] Bundles: R; LaTeX deep include parsing

Peter Cowan cowan.pd at gmail.com
Mon May 1 23:55:15 UTC 2006


On 5/1/06, Charilaos Skiadas <cskiadas at uchicago.edu> wrote:

> Some more things I'd like to see:
> 1) Be able to run the whole file and see the output in a nice html
> window, like it happens with Ruby. I've tried to make that work, but
> was unable to.
> 1+) Extra points for producing a list of links to all images created
> during the session.
> 2) Instant tooltip help on current word.

This would be great, do any other language bundles have a similar feature?
I'd like to be able to get any help on the selected word, preferably
the local (harddrive) help but the web would be fine.

> 3) (Ideally, via a plugin probably) Be able to have a "session" with
> R, i.e. type commands and have their result appear. Each pressing of
> "return" should execute the current line in a running version of R,
> and insert the output on the next line.

This shouldn't be too difficult, there is a shell command for running
R code.  R CMD BATCH.

> 4) Function name completion, for standard functions as well as
> packages installed and loaded in current file.
> 5) Snippets for -> and <-

You can make these yourself.  I did for '<-' which I assigned to
space-tab.  I rarely use '->' except interactively.  What other
snippets have people written for R?


> 6) Syntax check, if possible.

I imagine this would be difficult because each package can have
different syntax requirement, can you be more specific by what you are
looking for?

> 7) Ability to run the program up to current line, and evaluate
> current selection in that context, and show result in tooltip.
>
> Number 1 is the most pressing one for me. Theoretically all these
> should be done via interaction with the command-line version of R,
> but I haven't been able to find the best mode that would do that. I'm
> guessing one should look at what ESS is doing and try to do something
> similar.

I would like a quicker way to send the current selection to R.app.  I
don't know if this is possible, but the current method can be sluggish
for longer scripts.

I also modified the language definition to include parenthesis for
folding as often my plot command span several lines and it's nice to
hide them.

Peter



More information about the textmate mailing list