Another awesome hidden editor feature…
You can customize your Find in Files results to show what you want to see and how you want to see it.
Example: You don’t want to view the entire file path shown in the Find Results tool window.
Find all "using", Match case, Whole word, Subfolders, Find Results 1, "Entire Solution"
C:\Documents and Settings\someuser\Local Settings\Temp\~vs90.cs(1):using System;
Matching lines: 1 Matching files: 1 Total files searched: 1
Instructions: (since these involve modifying registry settings, please use at your own risk!)
1. Go to HKCU\Software\Microsoft\VisualStudio\8.0\Find
2. Add a new string called Find result format with a value of $f$e($l,$c):$t\r\n where
$f is the filename
$e is the extension
$l is the line
$c is the column
$t is the text on the line
Note: You don’t have to restart Visual Studio to pick up on your registry changes.
Results:
Find all "using", Match case, Whole word, Subfolders, Find Results 1, "Entire Solution"
~vs90.cs(1,1):using System;
Matching lines: 1 Matching files: 1 Total files searched: 1
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
\$ $
If you come up with a great combination of values, please leave a comment and share with the group!
Tags: VSTips