I know how to search for a single string in several files at once with Sublime 3 (explained here).
What I need to do is to search for multiple strings in several files. I've tried going to Find in files
and setting:
Field: string1 \& string2 Where: /path_to_folder_containing_the_files_I_want_to_ search/
(where string1
and string2
are the strings I want to search for) but that doesn't seem to work.
Can this be done at all?
Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ).
Multiple Selections To select multiple regions using the keyboard, select a block of text, then press Ctrl+Shift+L to split it into one selection per line. When you're done with using multiple selections, just press Ctrl+K to trim all but the first.
Just came across this old question and thought I'd add my solution, which may be useful for somebody in the future.
Sublime supports searching in all open folders and can use regex. So utilizing both, you can open or add all folders you want to search in to the project and use regex to search for multiple keywords. In your case it would be the following (make sure to check the regex box .*
icon):
Find: (string1|string2) Where: <open folders>
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