Visual Studio Tip: Customizing Search Output in Visual Studio

Sign in to queue

The Discussion

  • User profile image

    Is there a way to only get a part of the path from the solution root folder?

  • User profile image

    Cool. This really does need to go on the options dialog.

    One question (without trying it): does this mean you can't click on the path to open the file? Because if that still works, then it's the best thing ever. If not then I'd (personally) keep the need to scroll to the right if it means I can open the file.

  • User profile image


    Thank you. Very useful.

    Can we apply the same tip to "Find Symbol Results" - ctrl+k+r ? If so, can you please tell me what will be the correspondent Folder for the action "Find Symbol Results"?



  • User profile image

    JohnLudlow, yes, you can still click to open the file.

    If you prefer a PowerShell script:

    Set-ItemProperty HKCU:\Software\Microsoft\VisualStudio\12.0\Find -Name 'Find result format' -Type String -Value '$f$e($l,$c):$t\r\n'

    -Jon Tims [MSFT]


  • User profile image

    @JonTims: Sweet 

    Yeah the PowerShell script is better for copy-past-iness.

    And yes, @dudumanbogda​nvlad raises a good point that this would be useful in the Find Symbol / Find References windows

  • User profile image

    BTW, I found this blog post which explains what the different specifiers mean:

    This is the format I've started using:


    It's mostly the same, but I've added some tabs to separate the file name from the match, and used $s instead of $t because it seems to trim out any leading spaces from the match. This (IMHO) leads to a more regular list of matches which is less randomly spaced.

    Thanks for the tip

  • User profile image

    You guys are off and running with this! Thanks for sharing the powershell script!

  • User profile image

    Very helpful. Thank you for posting.

Add Your 2 Cents