Tuesday, 20 October 2009

Customised Search Results in Visual Studio

Are you constantly annoyed by the very long File path in the Find Results Window when searching through the File/Project/Solution in Visual Studio?

I found a registry hack to shorten the display path:

1) Type Regedit in "Run"
2) Navigate to HKCU\Software\Microsoft\VisualStudio\9.0\Find
3) Add a new string item called Find result format with a value of $f$e($l,$c):$t\r\n

And here’s the full list of items you can specify in the registry

Files
$p path
$f filename
$v drive/unc share
$d dir
$n name
$e .ext

Location
$l line
$c col
$x end col if on first line, else end of first line
$L span end line
$C span end col

Text
$0 matched text
$t text of first line
$s summary of hit
$T text of spanned lines

Char
\n newline
\s space
\t tab
\\ slash
\$ $

Modify at your own risk! Please back up your registry before making any changes.

No comments: