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. But that doesn't seam to apply to the incremental search.
Asked
Active
Viewed 639 times
0
-
what do you mean by incremental search? – hallie Mar 16 '10 at 08:22
-
In Visual Studio 2005 you find this function in the menu Edit - Advanced - Incremental Search. In most keyboard mappings you can reach this through the short cut "Ctrl+I". – Örjan Jämte Mar 16 '10 at 10:39
1 Answers
3
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.

Omer Raviv
- 11,409
- 5
- 43
- 82
-
This doesn't answer the question, though. The question was about how to do incremental search in *collapsed* (hidden) regions in *VS 2005* (I was thinking of 2008 when I put the bounty, but same difference). The whole *point* was to not have to toggle it, otherwise I might as well press Ctrl-F. – user541686 Jan 12 '11 at 06:22
-
Not the solution I was looking for, but I have a feeling there just isn't a better one, so thanks. :) – user541686 Jan 12 '11 at 08:35