ESS Smart Underscore
ess-smart-underscore.el — Ess Smart Underscore
- Matthew L. Fidler
- Matthew Fidler
- Thu Jul 14 11:04:42 2011 (-0500)
- Mon Apr 9 15:27:09 2012 (-0500)
- Matthew L. Fidler
- Update #
- ESS, underscore
`custom’, `easymenu’, `ess’, `ess-compat’, `ess-custom’, `font-lock’, `syntax’, `widget’.
To use without using a package manager:
- Put the library in a directory in the emacs load path, like ~/.emacs.d
- Add (require ‘ess-smart-underscore) in your ~/.emacs file
This is in emacswiki, so this package can also be installed using el-get.
After installing el-get, Type M-x el-get-install ess-smart-underscore.
Ess-Smart Underscore Package Information
Smart “_” key: insert
- in string/comment
- after a $ (like d$one_two) (toggle with
- when the underscore is part of a variable definition previously defined. (toggle with `ess-S-underscore-after-defined’)
- when the underscore is after a “=” or “<-” on the same line.
- inside a parenthetical statement () or .
- At the beginning of a line.
- In a variable that contains underscores already (for example foo_a)
- The preceding character is not a tab/space (toggle with
ess-S-underscore-when-last-character-is-a-space. Not enabled by default.)
An exception to #4 is in the following situation:
a <- b |
Pressing an underscore here would produce
a <- b <-
However when in the following situation
a <- b|
Pressing an underscore would produce
a <- b_
This behavior can be toggled by
If the underscore key is pressed a second time, the assignment
operator is removed and replaced by the underscore.
typically ” <- “, can be customized. In ESS modes other than R/S,
an underscore is always inserted.
In addition the ess-smart-underscore attempts to work with noweb-mode
- Added more ggplot operators. (Matthew L. Fidler)
- Added math to ggplot’s functions… (Matthew L. Fidler)
- Added hook to R-mode to make it behave a little better. (Matthew L. Fidler)
- Fixed ess-smart-underscore to work in an inferior R process. (Matthew L. Fidler)
- Added ggplot function prefixes. (Matthew L. Fidler)
- Better handling of noweb. I think it Came from Denis Haine and Martin Maechler. (Matthew L. Fidler)
- Support unbalanced sexps. (Matthew L. Fidler)
- Took out auto-installing. Most package managers don’t want you to do this. (Matthew L. Fidler)
- Bug fix for parenthetical statement (Matthew L. Fidler)
- Changed to allow underscore instead of assign when inside a parenthetical statement. (Matthew L. Fidler)
- Bug fix for d[d$CMT == 2,”DV”] _ to produce d[d$CMT == 2,”DV”] <- (Matthew L. Fidler)* Variables