Reputation: 6282
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.)
Upvotes: 16
Views: 3861
Reputation: 6595
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...
Upvotes: 21
Reputation: 171188
Although I can't answer the question directly I want to propose Ctrl-K-D
as an alternative. This will invoke Visual Studio built-in formatting. It is less thorough but also less intrusive.
Upvotes: 1