开发者

Search hidden text with incremental search

开发者 https://www.devze.com 2022-12-22 21:15 出处:网络
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

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

精彩评论

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

关注公众号