Closed dvg-p4 closed 1 month ago
This is especially annoying since the situation in which this feature is the most needed -- a function that takes a large number of arguments -- is also the situation in which I'm most likely to want to spread out the arguments across multiple lines, in accordance with https://style.tidyverse.org/syntax.html#long-lines
Do you have this preference checked?
...yes, but if I also turn on "Use tab for multiline autocompletions" directly below it, that produces exactly the behavior I want and completely solves my problem. Thanks!
I'd argue that should be on by default, but I don't feel super strongly about that since I've already gotta muck around with the settings to turn on vim keybinds at every new place I use Rstudio in, so it's not much additional hassle to me personally :-)
...actually, it looks like I'm the third person to file a ticket not realizing this was an option (oops, should've searched) and a couple of my coworkers said that they were unaware this was an option and definitely want to turn it on now that they know what it is. So maybe I do feel strongly that it should be on by default.
System details
Steps to reproduce the problem
In a .R file (or .Rmd file within a code block) type:
glm([return]
Rstudio will automatically add the closing brace and an indent, as desired. (
|
represents the cursor):Then, press the "tab" key.
Describe the problem in detail
An additional indent is inserted:
Describe the behavior you expected
A list of function arguments pops up, as when pressing tab within function arguments without a newline, e.g. typing
glm([tab]
yields