by Wojciech Sura

Visual Studio 2013 productivity tips

There are a few things you may not know, which can significantly boost your productivity in Visual Studio 2013.

You may access items named in PascalCase by simply writing word initials, like IOE for InvalidOperationException or IOException.


The quick way to open context menu on suggested change (like adding a class, method, renaming identifier etc.) is Ctrl+. (Ctrl + dot). If you remember, which item is default (such as renaming identifier), performing desired refactoring is as quick as pressing Ctrl+., Enter.


You can very quickly search for Visual Studio settings in the top-right field accessible quickly by Ctrl+Q.

Search settings

Visual Studio supports so called progressive search feature. Visually it looks almost identically to the Find dialog, but that dialog is closed immediately, when you finish searching (for instance, when you press the arrow key). Also, it does not fill the input box with what is currently under the cursor – instead it waits until you start typing. Shortcut for the progressive search is Ctrl+I. If you want to search for next occurrence, press F3.

Progressive search dialog:

Progressive search

Regular search dialog:

Regular search

There’s also another type of search, which seeks through all symbols and filenames in the solution. The shortcut for this one is Ctrl+, (Ctrl + comma).


If you work with a huge solution, you may narrow the view of Solution Explorer to specific branch by choosing “Scope to this” from the context menu. Use the home icon to return to the solution view again.

Solution explorer

There are also a few shortcut chords used more frequently than the others:

  • Ctrl+K, Ctrl+F – Auto-format selection
  • Ctrl+M, Ctrl+L – Fold all / Unfold all
  • Ctrl+M, Ctrl+M – Fold current block
  • Ctrl+M, Ctrl+O – Fold to definitions
  • Ctrl+K, Ctrl+K – Set bookmark in place of cursor
  • Ctrl+K, Ctrl+N – (like “Next”) – jump to next bookmark in the code
  • Ctrl+K, Ctrl+P – (like “Previous”) – jump to previous bookmark in the code
by Joakim

Using WinMerge as the default diff/merge tool in Visual Studio 2012/2013

Updated: The procedure described below also works for Visual Studio 2013!

I found the default diff/merge tool in Visual Studio 2012 to be a huge improvement over previous versions, as now you are actually able to see what has changed quite easily.


But that being said, I still prefer to use WinMerge as the default diff/merge tool since it has more features. Another nice feature of WinMerge is the possibility to integrate it into Windows Explorer which allows me to diff files (and folders) on my hard drive.

So how do you make WinMerge the default diff/merge tool in Visual Studio?

Go into “Tools –> Options –> Source Control –> Visual Studio Team Foundation Server”, click on “Configure User Tools …”, and add new commands for the “Compare” and “Merge” operations.



Values for the compare command;
Extension: .* (meaning all files)
Operation: Compare
Command: C:Program Files (x86)WinMergeWinMergeU.exe (the path to where WinMergeU.exe is located)
Arguments: /e /u /wl /dl %6 /dr %7 %1 %2 (the arguments for WinMerge, I’ll explain them in detail further down)

Values for the merge command;
Extension: .*
Operation: Merge
Command: C:Program Files (x86)WinMergeWinMergeU.exe
Arguments: /e /u /wl /dl %6 /dr %7 %1 %2 %4

After you add these two commands, right-clicking a file in Visual Studio and selecting “Compare…” should result in the two files being opened and compared in WinMerge. Should you want to go back to using Visual Studio’s own diff/merge tool, you just remove the two commands again.


So what do the values used in the arguments field in the two commands actually mean?

Values starting with a forward slash (/) are WinMerge command-line parameters. The full list of possible parameters can be found here. But I’ll list the ones I use (not all of them are necessary, you may remove some or add others as you prefer):

/e –> Enables you to close WinMerge with a single Esc key press
/u –> Prevents WinMerge from adding either path (left or right) to the Most Recently Used (MRU) list
/wl –> Opens the left side as read-only
/dl –> Specifies a description in the left side title bar
/dr –> Specifies a description in the right side title bar

Values starting with a percentage sign (%) are provided by Visual Studio as input for the WinMerge parameters. You can see what they stand for by clicking the “play” button behind the arguments field when you create the command, but I’ll list them here as well (I’ve greyed out those I don’t use):

%1 –> Original file
%2 –> Modified file
%3 –> Base file
%4 –> Merged file
%5 –> Diff command-line options
%6 –> Original file label
%7 –> Modified file label
%8 –> Base file label
%9 –> Merged file label

WinMerge can be downloaded the from here.