[R-SIG-Mac] Assignment arrow
Seth Falcon
sfalcon at fhcrc.org
Wed Feb 28 20:16:41 CET 2007
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.
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
More information about the R-SIG-Mac
mailing list