Comparison keyboard shortcuts for Pending Changes in TFS

by Alex Meyer-Gleaves 5 September 2009 - 6:01 PM

Logitech MX5500

One of the first things I configured in my Visual Studio environment when I starting using TFS was keyboard shortcuts to make comparing my pending changes easier. I find having to right-click on each item in the Pending Changes window and navigate through the context menu to perform a comparison quickly tests my patience. The drop down menu on the tool bar button is slightly faster but still not quick enough for my liking. I am always fastest when my hands don’t need to leave the keyboard.

I have configured keyboard shortcuts to compare my pending changes with the Latest, Workspace and Previous versions. Obviously the shortcuts only work when the option would normally appear enabled on the context menu. To configure these shortcuts select Options from the Tools menu in Visual Studio. In the Options dialog use the tree to drill into Environment and then to the Keyboard settings. Enter the command names below into the Show commands containing text box one at a time:

  • TeamFoundationContextMenus.SourceControlPendingChangesSourceFiles.Compare.TfsContextPendingCheckinsCompareWithLatestVersion
  • TeamFoundationContextMenus.SourceControlPendingChangesSourceFiles.Compare.TfsContextPendingCheckinsCompareWithWorkspaceVersion
  • TeamFoundationContextMenus.SourceControlPendingChangesSourceFiles.Compare.TfsContextPendingCheckinsCompareWithPreviousVersion

For each command enter your desired keyboard shortcut into the Press shortcut keys text box and click the Assign button. I have used the shortcut keys below, assigned to the commands in the same ordinal position above:

  • Ctrl+`
  • Ctrl+Shift+`
  • Ctrl+Alt+`

With this in place I can quickly fire up and navigate through my diffs in WinMerge using only my keyboard. No mucking about and no reaching for the mouse. Even a simple set of steps can become frustrating when you have to repeat them a large number of times. Save yourself all that clunky mouse based GUI interaction and embrace the power of the keyboard!

Update: With the new Pending Changes page in Visual Studio 2012 the command have changed.

For Visual Studio 2012 use the command names below instead:

  • TeamFoundationContextMenus.PendingChangesPageChangestoInclude.TfsContextPendingChangesPageCompareWithLatestVersion
  • TeamFoundationContextMenus.PendingChangesPageChangestoInclude.TfsContextPendingChangesPageCompareWithPreviousVersion
  • TeamFoundationContextMenus.PendingChangesPageChangestoInclude.TfsContextPendingChangesPageCompareWithWorkspaceVersion

Tags: ,

Development Tools

Comments (5) -

gustavo
gustavo Argentina
24 December 2011 - 1:03 AM #

cool, thanks

Reply

Karthick
Karthick Singapore
18 April 2012 - 3:17 PM #

Thanks that saved a lot of time.

Reply

Jeff Olson
Jeff Olson United States
19 July 2012 - 1:50 AM #

Thank you, this is very helpful!

Reply

BlueGrass
BlueGrass United States
21 July 2012 - 6:02 AM #

This is awesome. Thanks!

Reply

NightKoder
NightKoder United States
22 February 2013 - 6:07 AM #

Excellent, was going to get Carpal Tunnel Syndrome with all the mouse clicking I had to do to compare my pending changes in TFS.

Reply

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

About the author

Alex Meyer-Gleaves I'm a Technical Architect living in Australia (that island like continent in the southern hemisphere). I love Microsoft .NET and C#. I hate early mornings, slow drivers and Lotus Notes.

Twitter

Google Shared

 

Month List

Recent Comments

Comment RSS

Links

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010