Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atom - search by extension in selected folder

Tags:

atom-editor

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.

like image 340
mszabc Avatar asked Mar 05 '16 12:03

mszabc


2 Answers

Try searching using src/**/*.c as file/directory pattern.

like image 183
Fab313 Avatar answered Nov 10 '22 08:11

Fab313


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/

like image 1
Danijel Avatar answered Nov 10 '22 08:11

Danijel