In earlier versions of Visual Studio, you could change the way that results from Find are presented by altering the value of HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\{VSVersion}\Find\Find result format
. In particular, I would set it to $f$e($l): $t\\r\\n
which removes the full path from the entry.
Making the same change to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\15.0\Find\Find result format
doesn't seem to do anything. Is there another way to address this in VS2017?
VS 2017 now uses private registry (see Where does Visual Studio 2017 RC store its config?). One way to access it directly is from a running Visual Studio 2017 instance with my Visual Commander extension. For example, you can use the following C# command:
public class C : VisualCommanderExt.ICommand
{
public void Run(EnvDTE80.DTE2 DTE, Microsoft.VisualStudio.Shell.Package package)
{
var key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(
@"Software\Microsoft\VisualStudio\" + DTE.Version + @"\Find");
key.SetValue("Find result format", @"$f$e($l): $t\r\n");
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With