Search hidden text with incremental search
In Visual Stuido 2005 (C# .NET), is it possible to search through hidden text with the incremental search (Ctrl+I)? In the Find an Replace window I have the checkbox "Search hidden text" checked. Bu开发者_C百科t that doesn't seam to apply to the incremental search.
This isn't the behaviour in VS2010 - searching for hidden text uncollapses regions automatically, so you might consider an upgrade :).
In any case, why not use the shortcut Ctrl-M, Ctrl-L which "Toggles all previously marked hidden text sections between hidden and display states" before and after you use incremental search?
To be able to do this in one keystroke, create a macro (From Tools->Macros) with the following code:
Sub OutlineAndIncrementalSearch()
DTE.ExecuteCommand("Edit.ToggleAllOutlining")
DTE.ExecuteCommand("Edit.IncrementalSearch")
End Sub
And bind this macro to Ctrl+I instead of the normal incremental search command.
精彩评论