弹丸搜索只是项目的一部分

nha*_*nha 5 emacs projectile emacs-helm

在使用 emacs Projectilehelm-projectile 时,我习惯于在整个项目中搜索文本。但是有没有办法只搜索项目的一部分?

就像是:

  • 仅在子文件夹内搜索
  • 在排除子文件夹的同时搜索

Ehv*_*nce 5

是的,您可以排除(子)文件夹。在您的.projectile:

-/sub/folder
Run Code Online (Sandbox Code Playgroud)

所以在子文件夹中搜索,我没有看到自动的东西。您可以将项目文件放在一些子文件夹中(https://projectile.readthedocs.io/en/latest/configuration/#file-local-project-root-definitions)并切换项目


nha*_*nha 3

现在我正在使用rgrep,它会提示输入字符串和要查找的目录。

我很高兴听到使用 的等效解决方案ag,并且我应该提到我还没有深入研究来自 @goromlagche 的链接(https://github.com/ggreer/the_silver_searcher#emacs)。