2016-01-13 16:43
浏览 363

如何从PhpStorm全局搜索中排除文件(Ctrl + Shift + F)

I want to exclude a file from the PhpStorm global search (Ctrl+Shift+F) but not exclude the file from the project itself. A good use case would be to avoid searching inside files like jQuery.js, but in my particular case, I have a plugin that generates code and it clutters my search results.

Being specific, this is the example search result: search-results

The first result is uselss and will always be for me. So I would like to exclude it from the results. However, if I exclude it from the project then it will not be included in the auto-complete features of PhpStorm, which is the sole purpose of that file in the first place.

Or are there any alternatives to this? I could select a folder and search only there, but it is not as convenient as just pressing Ctrl+Shift+F directly from the editor

图片转代码服务由CSDN问答提供 功能建议

我想从PhpStorm全局搜索中排除文件(Ctrl + Shift + F)但不排除文件 项目本身。 一个很好的用例是避免在像jQuery.js这样的文件中搜索,但在我的特定情况下,我有一个生成代码的插件,它会使我的搜索结果变得混乱。

具体, 这是示例搜索结果:

第一个结果是uselss,将永远适合我。 所以我想将其排除在结果之外。 但是,如果我将它从项目中排除,那么它将不会包含在PhpStorm的自动完成功能中,这首先是该文件的唯一目的。

或者是 还有其他选择吗? 我可以选择一个文件夹并仅在那里搜索,但它不如直接从编辑器按Ctrl + Shift + F方便

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • douzhuo5671 2016-01-13 16:49

    You can do that defining a scope

    First of all you have to define a scope containing all the directories of your project that you want to be "searchable".

    Go to Appereance & Behaviour -> Scopes and create the scope

    Then, in the "Find in Path" window you can select the Custom scope you want to use for the search

    点赞 打赏 评论
  • douwei1930 2016-01-13 16:48

    Right-click on the folder > Mark directory as > Excluded

    enter image description here

    点赞 打赏 评论
  • doushe7934 2016-01-13 16:50

    When You press Ctrl+Shift+F there is an option for scope where you can specify the files you want to search.


    点赞 打赏 评论

相关推荐 更多相似问题