Acidic
Acidic

Reputation: 6282

Reformatting code with R# in a single keyboard shortcut

Using the R# keyboard shortcut for formatting code presents the following window:

enter image description here

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

Answers (2)

stmax
stmax

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

usr
usr

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

Related Questions