忽略搜索结果中的文件夹 [英] Ignore a folder in search results
问题描述
我正在搜索字符串并在源文件夹中获取匹配项,并且构建文件夹(源代码中的文件在构建期间被复制到构建中)。
I'm searching for a string and getting matches in a source folder, and a build folder (file in source gets copied to build during build).
I不需要构建文件夹结果。
I do not need the build folder result.
Vim有 wildignore
这有助于过滤掉结果。
Vim has wildignore
which helps filter out results.
intelij中有类似内容吗?
Is there something similar in intelij?
推荐答案
标记你的构建排除的文件夹:
Mark your build folder as excluded:
文件>项目结构>模块>来源>标记为已排除(红色图标)
您也可以右键单击您的文件夹并选择将目录标记为> ;已排除
。
You can also just right click on your folder and select Mark Directory As > Excluded
.
排除的文件夹(显示为rootExcluded)是IntelliJ IDEA部分忽略的文件夹。为排除文件夹中的文件提供了非常有限的编码帮助。排除文件夹中包含的类不出现在代码完成建议列表中,对这些类的引用在编辑器中显示为未解析。 搜索时,IntelliJ IDEA不会查找已排除的文件夹等。
注意:请参阅由Nader Hadji Ghanbari回答使用Scopes的另一种方法。
Note: See the answer by Nader Hadji Ghanbari for another approach using Scopes.
这篇关于忽略搜索结果中的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!