24

I'm using node_modules to store my code, following the advice of this answer: https://stackoverflow.com/a/24630974/599184

However, Atom's search ignores node_modules. How can I get it to include node_modules in the search? I don't have node_modules in Atom's "ignored names" setting.

Community
  • 1
  • 1
Leo Jiang
  • 24,497
  • 49
  • 154
  • 284

4 Answers4

50

I unchecked Exclude VCS ignored paths in main settings but it didn't work. So I did some research and I found out that there is another setting that overrides this.

The setting you need is found in

Settings > Packages > Core Packages > Tree View

Here you’ll find Hide Ignored Names and Hide VCS Ignored Files settings – the latter is the one you want to stop the sidebar from ignoring files that your VCS ignores.

hide ignored elements

Got this from the following source and it works for me:

blog.lukebennett.com/2015/09/21/show-hidden-files-in-atom-sidebar

Community
  • 1
  • 1
Adam Ilčišák
  • 627
  • 6
  • 14
  • That works for me, I guess this is a default behavior which cause hiding `node_modules` and other ignore stuff. – Ibrahim.H Jun 11 '20 at 18:35
27

The default behavior in Atom is to ignore the folders and files in .gitignore

Two solutions:

  • In Atom main settings, uncheck "Exclude VCS ignored Paths"

or

  • When you do a project search, use "node_modules" as file/directory pattern if you are searching in the node_modules directory, or "node_modules, src" if you are searching in the node_modules directory and in your src folder, for example
Fab313
  • 2,268
  • 2
  • 25
  • 28
3

You can also try this for newer versions:

File > Config...

    "*":
  core:
    excludeVcsIgnoredPaths: false <-- Set to false
    uriHandlerRegistration: "always"
  "exception-reporting":
    userId: "****"
  "tree-view":
    hideVcsIgnoredFiles: false <-- Set to false
  welcome:
    showOnStartup: false
Andrew I.
  • 252
  • 1
  • 5
1
  1. Click within the tree-view pane.
  2. Press i to toggle files and directories hidden by .gitignore.
jacob
  • 828
  • 8
  • 13