I want to select an expression in code and type Ctrl+Whatever
so it has the same result as [ Ctrl+Shift+F AND Clicking on "Find All" ]
EDIT : [Ctrl+Shift+F AND Hitting Enter] may be quicker than clicking but I still want something more specific and faster
Remark : I am NOT interested the Find All References shortcut.
You could use a macro. I recorded and modified one in VS2010:
Sub FindAllFiles()
DTE.Find.FindWhat = DTE.ActiveDocument.Selection.ToString()
DTE.Find.Target = vsFindTarget.vsFindTargetFiles
DTE.Find.MatchCase = False
DTE.Find.MatchWholeWord = False
DTE.Find.MatchInHiddenText = True
DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxLiteral
DTE.Find.SearchPath = "Entire Solution"
DTE.Find.SearchSubfolders = True
DTE.Find.FilesOfType = ""
DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResults1
DTE.Find.Action = vsFindAction.vsFindActionFindAll
If (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound) Then
Throw New System.Exception("vsFindResultNotFound")
End If
End Sub
The macro can be set to a keyboard shortcut. See: http://msdn.microsoft.com/en-us/library/a0003t62(v=vs.80).aspx
Not that I would be aware of it. Ctrl+Shift+F + ENTER
(ENTER instead of Clicking on "Find All") is probably the closest it comes. And if you are a touch typist it is as fast as a single shortcut.
Update
Now, that the question has changed my answer makes no sense anymore. Go with a macro like Fosco answered it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With