不要忽略 Atom 中的 node_modules

Don't ignore node_modules in Atom

我正在使用 node_modules 来存储我的代码,遵循这个答案的建议:

但是,Atom 的搜索会忽略 node_modules。如何让它在搜索中包含 node_modules?我在 Atom 的 "ignored names" 设置中没有 node_modules

Atom 中的默认行为是忽略 .gitignore

中的文件夹和文件

两种解决方案:

  • 在 Atom 主要设置中,取消选中 "Exclude VCS ignored Paths"

  • 当您进行项目搜索时,如果您在 node_modules 目录中搜索,请使用 "node_modules" 作为 file/directory 模式,或者 "node_modules, src" 如果您在 node_modules 目录和您的 src 文件夹中搜索,例如

我在主要设置中取消选中 Exclude VCS ignored paths 但它不起作用。所以我做了一些研究,发现还有另一种设置可以覆盖它。

您需要的设置在

设置>包>核心包>树视图

在这里你会找到Hide Ignored NamesHide VCS Ignored Files设置——后者是你想要停止的侧边栏忽略您的 VCS 忽略的文件。

从以下来源得到这个并且对我有用:

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

您也可以尝试更新版本:

文件 > 配置...

    "*":
  core:
    excludeVcsIgnoredPaths: false <-- Set to false
    uriHandlerRegistration: "always"
  "exception-reporting":
    userId: "****"
  "tree-view":
    hideVcsIgnoredFiles: false <-- Set to false
  welcome:
    showOnStartup: false
  1. 在 tree-view 窗格中单击。
  2. i 切换被 .gitignore 隐藏的文件和目录。