0lukasz0
0lukasz0

Reputation: 3267

Visual Studio plugin for text searching

I am looking for Visual Studio plugin for searching text entries (like ctr+f, NOT searching by file names or types - Resharper does it great), but with extra options, like:

Can you recommend anything?

Upvotes: 0

Views: 153

Answers (2)

pdr
pdr

Reputation: 6440

There's always Powershell, with a combination of Get-ChildItem -Recurse to find the files you want, Get-Content to scan the content of the file and the -match operator to find the strings you want by Regular Expression.

For example, this will show you a list of the filenames for the files which contain the expression:

Get-Childitem c:\Projects -Exclude *.csproj -Recurse | ? { (Get-Content $_) -match "<expression>" }

Or this will show you all the matching lines, grep-style:

Get-Childitem c:\Projects -Exclude *.csproj -Recurse | Select-String -pattern "<expression>"

Upvotes: 1

softveda
softveda

Reputation: 11066

The "Find in Files" ctrl+shift+f can do most of the above you want.
It can include only certain file types (but not exclude), do case sensitive /insensitive search and use regular expression as well.

But if you really want a plugin take a look at Sonic File Finder (http://www.jens-schaller.de/sonic-tools/sonicfilefinder/overview/overview.htm). I used to use it in VS 2005 until I got resharper where I search mostly by types, symbols or TODOs.

Upvotes: 2

Related Questions