Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the Find result format in Visual Studio 2017?

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?

like image 529
jakop Avatar asked Oct 18 '25 17:10

jakop


1 Answers

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");
    }
}
like image 179
Sergey Vlasov Avatar answered Oct 21 '25 07:10

Sergey Vlasov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!