My solution has several pdf files that are either served up as static files for download, or bundled into the solution as convenient references for the developer. When searching for small text strings I often get huge numbers of lines of binary-unicode gibberish that floods the search results list. I want a way to exclude pdf files from my search results.
To clarify: I'm aware of the Look at these file types
combobox; but I don't want to manually add/remove a whitelist (to avoid problems interfacing with 3rd party systems which produce data with arbitrary extensions). I want to add *.pdf to the black list of files like *.jpg or *.png that VS doesn't attempt to search as if they were text. Something that would allow VS to properly search a .pdf file would be an acceptable alternative.
I want to add *.pdf to the black list of files like *.jpg or *.png that VS doesn't attempt to search as if they were text.
Use CTRL + SHIFT + F and the following regexp to search for text, such as b
:
^\w+b\w+$
Use the PDF prolog to identify PDF files:
^%PDF-1
References
Using Regular Expressions in Visual Studio
Searching and Navigating Code in Visual Studio 2010
Unicode Categories
Visual Studio trick to quickly find any file in solution
Find in Files: Find Options
Improvements to Find All References in Visual Studio 2010
PDF File Analyzer
Parsing PDF file using Regular expresions in Python
Visual Studio 2012 New Features: Solution Explorer
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