Atom - search by extension in selected folder

Viewed 5383

When I search for certain string ("Search in directory"), atom allows to do 2 things: specify directory or file extension (but then it searches in all directories in project). Is it possible to do both at the same time? E.g. I want to do recursive search in 'src' directory, but using only *.c and *.cpp files.

2 Answers

To search both *.c and *.cpp files, use ,:

src/**/*.c, src/**/*.cpp

To speed things up, use ! to exclude an unwanted directory:

src/**/*.c, src/**/*.cpp, !src/not_this_dir/

Related