WebStorm:忽略项目中的文件而不从源代码管理中删除?

WebStorm: Ignore files in project without removing from source control?

我有一个大型项目,其中包含一些我通常不需要处理的文件。我经常使用 CTRL+SHIFT+F 在项目中的所有文件中查找字符串。我想从该搜索中排除一些文件。我发现 this in the documentation:

If you don't need a file right now but you don't want to completely remove it, you can temporarily exclude the file from the project. Excluded files are ignored by code completion, navigation, and inspections.

To exclude a file, right-click it in the Project tool window and select Mark as Plain Text from the menu. The file is marked with the plain text icon icon in the directory tree.

To revert the changes, right-click the file and select Mark as from the menu.

首先,这看起来很奇怪……"Mark as plain text"?不管怎样,我试过了,文件仍然出现在搜索中。在不从源代码管理中删除文件的情况下,我还能对 "ignore" 这些文件做些什么吗?

文本文件(标记为纯文本,以及通常的 .txt 文件)未从搜索中排除 - 仅从 navigation/completion 中排除。 要从所有索引中排除文件,您可以将其添加到 排除文件: 列表中 设置 |目录。请参阅your link按名称模式排除文件和文件夹部分

请注意,可以使用 标记目录 as/Excluded 右键单击​​菜单项来排除文件夹。不幸的是,单个文件没有这样的选项。如果你错过了,请投票给IDEA-139359