Using the R# keyboard shortcut for formatting code presents the following window:
which forces me click the Run button every time.
Is there a way to bind a keyboard shortcut directly into the Reformat Code option, rather than just opening this dialog window?
Edit: To make things clear, I don't actually click the Run button with the cursor, I press Enter. (I still find it annoying, and wish for a direct shortcut.)
Rstudio can now format code to look neat. Select the lines of interest and then navigate to Code >> Reformat code or use the keyboard shortcut Ctrl + Shift + A . or just run the style directory command to style all the files in the directory. There is a new feature that has been added by R-studio Addins .
format() function in R Programming Language is used to format strings and numbers in a specified style. Parameters: x: is the vector input. digits: is the total number of digits displayed.
Oh sweet.. I just checked Tools -> Options -> Keyboard and found the command "ReSharper_SilentCleanupCode". It seems to execute ReSharper's code formatting function without popping up the dialog. Give it a try but try to not break your fingers... the default is ctrl-alt-shift-f :D That needs a rebind...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With