In the sublime text editor, how do you search recursively in a directory for only certain file types? E.g. in a directory for all *.cc and *.h files?
The asterisk ( * ) The asterisk represents any number of unknown characters. Use it when searching for documents or files for which you have only partial names. For most web search engines, wildcards increase the number of your search results.
You can use your own wildcards to limit search results. You can use a question mark (?) as a wildcard for a single character and an asterisk (*) as a wildcard for any number of characters. For example, *. pdf would return only files with the PDF extension.
Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ).
An asterisk is replaced by any number of characters in a filename. For example, ae* would match aegis, aerie, aeon, etc. if those files were in the same directory. You can use this to save typing for a single filename (for example, al* for alphabet.
Specify the path in the Find 'Where' field and wildcards after the path seperated by commas.
e.g. /path/to/search,*.cc,*.h
You can also exclude file-types with the minus '-' character: /path/,-*.xml
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