The combination of these two effects makes it impossible to use.
Note the function below, which serves as foundation for wrappers that add a sign at the end and insert a new line; e.g.: endwrite(' %>% \n') or endwrite(' + \n'), each with their own keybindings.
In the specific example below, endwrite(' %>% \n') is called after writing var2 inside of the automatically generated parentheses (the typical use-case). reformatCode unnecessarily adds two blank lines afterwards. Because it selects them as well, it is most often fine to just keep typing, as they get deleted at the stylistically correct position... except that these new lines get added across all source documents with a cursor (e.g. popped out) that were recently active, so they start accumulating empty new lines wherever the cursor was. Adding a call to rstudioapi::insertText("") does not change things, to my surprise.
df %>%
distinct(var1, var2) %>%
Is there a workaround I'm not aware of?
I'm using rstudioapi version 0.13 with R 4.0.3 on Windows 10.
The combination of these two effects makes it impossible to use.
Note the function below, which serves as foundation for wrappers that add a sign at the end and insert a new line; e.g.:
endwrite(' %>% \n')
orendwrite(' + \n')
, each with their own keybindings.In the specific example below, endwrite(' %>% \n') is called after writing
var2
inside of the automatically generated parentheses (the typical use-case).reformatCode
unnecessarily adds two blank lines afterwards. Because it selects them as well, it is most often fine to just keep typing, as they get deleted at the stylistically correct position... except that these new lines get added across all source documents with a cursor (e.g. popped out) that were recently active, so they start accumulating empty new lines wherever the cursor was. Adding a call torstudioapi::insertText("")
does not change things, to my surprise.Is there a workaround I'm not aware of?
I'm using rstudioapi version 0.13 with R 4.0.3 on Windows 10.