Tue
Jul 28
2009

Resharper Shortcuts

A few custom shortcuts because I can never remember which Resharper command they are…

Alt-N: ReSharper.ReSharper_UnitTest_ContextRun
Ctrl-Alt-T: ReSharper.ReSharper_ShowUnitTestExplorer
Ctrl-Alt-R: ReSharper.ReSharper_ShowUnitTestSessions
Ctrl-Alt-E: ReSharper.ReSharper_UnitTest_RunCurrentSession

Visual Studio macro for resetting these bindings:

Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics
 
Public Module Module1
 
    Public Sub BindShortcuts()
        Bind("ReSharper.ReSharper_UnitTest_ContextRun", "Alt+n")
        Bind("ReSharper.ReSharper_ShowUnitTestExplorer", "Ctrl+Alt+T")
        Bind("ReSharper.ReSharper_ShowUnitTestSessions", "Ctrl+Alt+R")
        Bind("ReSharper.ReSharper_UnitTest_RunCurrentSession", "Ctrl+Alt+E")
        Bind("File.CloseAllButThis", "Ctrl+Alt+Shift+W")
        MsgBox("Done.")
    End Sub
 
    Private Sub Bind(ByVal commandName As String, ByVal globalBinding As String)
        Dim command As Command
        command = DTE.Commands.Item(commandName, 1)
        command.Bindings = "Global::" & globalBinding
    End Sub
 
End Module

© 2009 Brian Low. All rights reserved.