Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search in files with wildcards in sublime

Tags:

sublimetext2

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?

like image 775
Vincent Scheib Avatar asked Aug 29 '12 19:08

Vincent Scheib


People also ask

Which wildcards are used for searching for 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.

How do you use wildcards to search files and folders?

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.

How do I search all files in Sublime Text?

Use the Search all shortcut: Ctrl + Shift + F , then select the folder in the "Where:" box below. (And for Mac, it's ⌘ + Shift + F ).

How do you use wildcards in file names?

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.


2 Answers

Specify the path in the Find 'Where' field and wildcards after the path seperated by commas.

e.g. /path/to/search,*.cc,*.h

like image 89
Vincent Scheib Avatar answered Oct 08 '22 18:10

Vincent Scheib


You can also exclude file-types with the minus '-' character: /path/,-*.xml

like image 13
Daniel Avatar answered Oct 08 '22 19:10

Daniel