[ESS] autocompletion of function arguments in 12.09
Vitalie Spinu
spinuvit at gmail.com
Tue Oct 9 21:48:06 CEST 2012
>> "Richard M. Heiberger" <rmh at temple.edu>
>> on Tue, 9 Oct 2012 15:27:03 -0400 wrote:
> Vitalie,
> What is your rationale for preferring space around " = "? I always
> want space around " <- ", and almost never around "=". In an
> argument list, the argument name and "=" and the value are the
> visual unit for me. That is a function call consists of a function
> name and then a list of arguments. The " = " gives the impression
> of three times as many units as I want to think about.
Yes, there are pros and cons, and of course it's a matter of taste (and
eye vision). Compare
foo(long.argument = safdsf, delim_arg = 343, funnyArg_sfd = sdfdf(sdfds))
foo(long.argument=safdsf, delim_arg=343, funnyArg_sfd=sdfdf(sdfds))
And now spread across lines:
foo(long.argument = safdsf,
delim_arg = 343,
funnyArg_sfd = sdfdf(sdfds))
foo(long.argument=safdsf,
delim_arg=343,
funnyArg_sfd=sdfdf(sdfds))
Before 12.09 we didn't have highlighting of "=", now it can be easily
activated. So it's even less of a problem now.
In general I feel that more sparse the code is, easier it is to
read. That includes spaces in "if( ", "for( ", " = " and various empty
lines inside functions to delimit declarations, main body, return values
etc. I literally force myself to put spaces and empty lines in the code,
because I know it will be much easier to read later.
Vitlaie
> Rich
> On Tue, Oct 9, 2012 at 3:12 PM, Vitalie Spinu <spinuvit at gmail.com> wrote:
>> >> Ali Tofigh <alix.tofigh at gmail.com>
>> >> on Tue, 9 Oct 2012 14:21:43 -0400 wrote:
>>
>> > After moving to ess 12.09, the auto-completion of function arguments
>> > puts spaces around the equal sign. This wasn't the case before and all
>> > my code is written without spaces around the equal sign in function
>> > calls. Is there any way of going back to the previous behaviour? I
>> > can't find any variable for this, or maybe I'm looking in the wrong
>> > place...
>>
>> Yes, the internal has been changed a bit.
>>
>> I have just added to trunk the customizable "ess-ac-R-argument-suffix"
>> variable, which defaults to " = ", because I think it's a better style;)
>>
>> Vitalie
>>
>> ______________________________________________
>> ESS-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/ess-help>
More information about the ESS-help
mailing list