问题描述
我想在 IntelliJ 中搜索我的整个项目目录,但将范围限制为在 VCS 中跟踪的文件.
I would like to search my whole project directory in IntelliJ but limit the scope to files tracked in VCS.
即与我通过执行 git grep
我看到 Find In Path 下有一个自定义范围 ->范围 ->VCS 范围 ->默认
但是这似乎排除了一些在 VCS 中跟踪的文件.是否有其他选项或自定义范围设置可以提供此功能?
I see there is a custom scope under Find In Path -> Scope -> VCS Scopes -> Default
however this appears to exclude some files which are tracked in VCS. Is there another option or custom scope setting which can provide this?
推荐答案
由于我目前无法完全按照自己的意愿行事(仅搜索在 VCS 中跟踪的文件),我通过手动标记要排除的文件夹找到了一种解决方法.
As I cannot currently do exactly what I want (Only search files tracked in VCS) I found a workaround by manually marking the folders I want to exclude.
即
右键单击转译的目标文件夹,然后将目录标记为 -> 生成的源根目录"
Right click on transpiled target folder and 'Mark Directory as -> Generated Sources Root'
现在,当您在路径中查找"时,不需要的匹配项将隐藏在生成的代码中的用法"下
Now when you 'Find in Path' the unwanted matches will be hidden under 'Usages in generated code'
这篇关于IntelliJ:将 Find in Path 范围限制为在 VCS 中跟踪的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!