Atom exclude node_modules folder from search Atom exclude node_modules folder from search git git

Atom exclude node_modules folder from search


Steps

  1. Launch atom
  2. From the menu: edit > preferences (atom > prefernces on Mac)
  3. From the side menu, click the button "Open Config Folder"

Now a new atom IDE should open.

  1. Open the file "config.cson"
  2. Add ignoredNames: ["node_modules"] under core

Example of a config.cson

"*":  core:    ignoredNames: [      ".git"      "node_modules"    ]  editor: {}  minimap:    plugins:      "highlight-selected": true      "highlight-selectedDecorationsZIndex": 0  welcome:    showOnStartup: false

Hope this helps


In the "File/directory pattern" field of the search use an exclamation mark followed by the name of the directory you want to ignore:

enter image description here


If your .gitignore file sits higher in the directory than where you are performing a Search in Directory your node_modules will not be excluded from Atom's search.

For that reason I recommend adding node_modules to the Ignored Names list in the Core Settings.

Atom Editor Ignored File Names