When using ESS under emacs to write R-code, it is useful to have the default os behavior having "_" replaced by "<-" (inserting two consecutive "_" will insert the underscore itself). But when inserting code into any buffer in ESS mode, this substitution also occurs, and any "_" is replaced by "<-", and this is not the desired behavior.
Is there a way to prevent the replacement only when inserting text?
At the moment, I completely disabled the replacement by adding this code to my .emacs
(ess-toggle-underscore nil)
But I would like to restore replacing '_' with '<-' only when writing is not when pasting.
Any idea?
source share