Customize your Find in Files Results in Visual Studio : The default find in files results window of Visual Studio provides you only File name and line number with in the braces along with the code text. You can customize these results to show what you want to see and how you want to see it. If you spend a lot of your time in reformatting these results for any purpose then this tip might be helpful for you in doing so. To display Find in files results view in a different format you need to add a registry setting under: HKEY_CURRENT-USER\Software\Microsoft\VisualStudio\8.0\Find. Following registry setting will display Find in files results in the below format: Directory: {Name of the directory} File Name: {Name of the file} Line#: {Line number} Code: {Code snippet}
$d is directory name $f is the filename $e is the extension $l is the line $t is the text on the line Note: You don’t have to restart Visual Studio to pick up on your registry changes. Example Results after the above Registry setting: Find all "[assembly: AssemblyCulture("")]", Whole word, Subfolders, Find Results 1, "c:\poroj\Source Code\PList", "*.*" Directory : c:\poroj \Source Code \PList\Business Logic\ File name : AssemblyInfo.cs Line #: 15 Code:[assembly: AssemblyCulture("")] Directory : c:\poroj \Source Code \PList\Business Logic\Properties\ File name : AssemblyInfo.cs Line #: 15 Code:[assembly: AssemblyCulture("")] Even you can erase or modify the previously typed in search strings in the "Look in" combo on the "Find in Files" search toolbar. This can be done by modifying or erasing previously typed in search string values at HKEY_CURRENT-USER\Software\Microsoft\VisualStudio\8.0\Find, this cannot be possible through the Visual Studio UI. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Tuesday, December 11, 2007
Customize your Find in Files Results in Visual Studio
Posted by Gopal Rao at 12/11/2007 05:47:00 PM
Labels: Tips, Visual Studio Tips
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment