How can I ignore some folder like 'node_modules‘ when I search in the directory?


#1

How can I ignore some folder like 'node_modules‘ when I search in the directory ?


#2

In the File/Directory pattern field you can specify which folders to search.
To include folders simply type the folder name. To exclude folders you prefix the folder name with an exclamation mark.
So to find in every file in your project except files in the node_modules folder you would add !node_modules to that field.
Multiple folders are comma separated so if you want to search the javascript folder but not the javascript/node_modules folder the pattern would be javascript, !javascript/node_modules.


Text search exclude with .gitignore?
#3

Also to be noted that if you keep your code under git, hg or equivalent, atom will ignore by default all files that are ignored by your version control system (all files matching the patterns in your .gitignore). [ This typically include node_modules, build, dist, .git and others… ]


#4

:grinning: Thx


#5

This is gold, thank you! :smiley: