4

With ESS + auto-complete, I get AC suggestions for function arguments that allow me to save time typing them out. What irks me is that it completes the function arguments with spaces around them. For example: print(x = ) instead of print(x=).

Is there a way to change this behavior in ESS using some variable customization?

4

See here for a hint to the solution. From the changelist for 12.09-1:

ESS[R] Auto-completion: new variable ess-ac-R-argument-suffix to customize the insertion of trailing "=". Defaults to “ = “.

And from the documentation for the variable ess-ac-R-argument-suffix:

ess-ac-R-argument-suffix is a variable defined in 'ess-r-completion.el'. Its value is " = "

This variable is an alias for 'ess-R-argument-suffix'. This variable is obsolete since 15.3; use 'ess-R-argument-suffix' instead.

Documentation: Suffix appended by 'ac-source-R' and `ac-source-R-args' to candidates.

You can customize this variable.

To fix:

(setq ess-R-argument-suffix "=")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.