How to reformat code without hitting "Run"?

Hello,

I habitually reformat code all the time while I write it, so the dialog box where I have to hit "Run" is really annoying..
Since I got used to IntelliJ for my minecraft stuff, I added a key binding for ctrl+alt+l in VS2012 to Resharper.ReSharper_CleanupCode.
But this command shows the "Code Cleanup" dialog box where I have to pick a profile and hit run.
I want a command that only runs Reformat code (the Default: Reformat Code profile) without me having to confirm the operation.

I sincerely hope this is possible to solve without too much fuss as the current situation is a touch annoying for me ,)

  -- Regards, Morten

2 comments
Comment actions Permalink

Go into the Resharper Options -> Code Cleanup page.  Near the bottom of the page is a dropdown - Profile to use with silent clean-up:  Select the one that you use and save the changes.  Next time you want to reformat your code, press Ctrl-E, F ( instead of Ctrl-E, C ).

0
Comment actions Permalink

Thanks! I also added ctrl+alt+l to "ReSharper_SilentCleanupCode" and now all should be good :)

I think there is a lot of improvement possible to the key binding interface in vs2012, though.. Like search by keypress would be neat..

  -- Regards, Morten

0

Please sign in to leave a comment.