[R] comand line options with editor call

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Aug 12 10:57:15 CEST 2002


On Sun, 11 Aug 2002, Ulf Martin wrote:

> Is there a way to call the editor with command line options?
> I.e. I want to use Vim and set it automatically in R mode when it is
> started.
> This requires something like
>
>    vim -c "set syn=r"
>
> as the start command.
> Any ideas?
>
> I am using R 1.5.1 under Win 2000.

Not possible on Windows.  The nub of the problem is that commands can
contain spaces, so there is no way to parse something like that.

options(editor='vim -c "set syn=r"')
does work on Linux, which assumes file paths do not contain spaces (even
though they can do so).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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 mailing list