Primary Menu

Creating handy shortcuts VS2010

There are several in-built keyboard shortcuts available in Visual Studio.

However, there are some actions that developers need shortcuts for, that are not available by default.

One of them is opening up “TFS Source Control Explorer” tool window. I typically attach Ctrl+Alt+S to this action.

Currently we have to open the Team Explorer, drill down to our team project, and then double click on the Source Control Explorer node in the Tree. This is time-consuming.

Here’s how to add Ctrl+Alt+S to “View TFS Source Control Explorer” to Visual Studio.

Go to Tools -> Options -> Environment ->Keyboard

On the right hand pane, filter the “Show commands containing” available commands by typing in “TFSSourceControlExplorer”

Once it’s highlighted in the listbox below, click and focus on “Press Shortcut Keys” textbox

Press Ctrl+Alt+S

Click on the “Assign” button next to the textbox

Hit OK

Done

Another handy shortcut is to assign “Close command on the Currently open File”

Follow the same steps above and assign “Ctrl+W” – the reason I assign Ctrl+W is it’s already in our muscle memory to mean “Close currently open tab document” when we use it in pretty much all browsers. (FireFox, Chrome, IE)