[R-SIG-Mac] Assignment arrow

Douglas Bates bates at stat.wisc.edu
Wed Feb 28 22:13:05 CET 2007


On 2/28/07, Seth Falcon <sfalcon at fhcrc.org> wrote:
> Simon Urbanek <simon.urbanek at r-project.org> writes:
>
> > John,
> >
> > On Feb 10, 2007, at 6:25 PM, John Shonder wrote:
> >
> >> To use R on my Mac, I had been running ESS in emacs under X11. I
> >> found R.app, and much prefer it -- especially the quartz graphics
> >> -- but there's one thing I miss about ESS: to get an assignment
> >> arrow "<-" you just type shift underscore. In R.app, you have to
> >> type the less than sign (shift-comma) followed by the dash. Coming
> >> over from ESS, the extra keystroke bothers me.
> >>
> >
> > To be honest IMHO it's one of the annoying "features" in ESS
> > (configurable, though, I presume), because "_" is a valid character
> > used in names, so you end up getting broken code like .Platform$r <-
> > arch instead of the intended .Platform$r_arch when copy/pasting code.
> > In old times it was legal to use _ instead of <-, so ESS was helping
> > to make your code more legible without changing the syntax (a_10 was
> > the same as a <- 10), but that is not true anymore.

This isn't really an ESS discussion but I will point out that if you
want an underscore character in ESS you can get it by typing two
consecutive underscores.  The first one gets changed into ' <- ' and
the second reverts to '_'.


> I agree about the default setting in ESS being annoying.  I have the
> following in my .emacs:
>
>     ;; leave my underscore key alone!
>     (ess-toggle-underscore nil)
>     (setq ess-S-assign-key [?\C-=])
>
> This way, <_> is itself and <ctrl>+<=> gives <- and <=> gives =.
>
> + seth
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>



More information about the R-SIG-Mac mailing list