开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜