PHPStorm通过掩码从索引中排除文件 [英] PHPStorm exclude files by mask from indexing
问题描述
我有一个PHP项目,出于某种原因(不是我的主动),它具有一些备份文件,例如"somefile-backup.php". 如何从索引中排除%backup%.php"?
I'm having a PHP project that for some reason (not my initiative) has some backup files like "somefile - backup.php". How do I exclude "%backup%.php" from indexing?
推荐答案
Settings/Preferences | Editor | File Types | Ignore files and folders
字段底部-添加*-backup.php
模式(或您需要的任何模式).
Settings/Preferences | Editor | File Types | Ignore files and folders
field on the bottom -- add *-backup.php
pattern (or whatever pattern you need).
请注意:,因为它是IDE范围的设置,因此会影响所有项目.
PLEASE NOTE: this affects all projects as it is an IDE-wide setting.
或者(没有尝试过自己,但应该可以工作):
Alternatively (have not tried myself, but should work):
Settings/Preferences | Editor | File Types | Recognized File Types | Text
在那里添加*-backup.php
模式.
这也会影响所有项目..但是,除了排除它们之外,它们还会将它们视为纯文本文件,因此在项目视图树中仍具有此类文件的同时,也不会进行索引/代码完成/语法突出显示/等操作(因此您可以进行编辑/delete/upload/etc(如果需要).
This will also affect all projects .. but instead of excluding it will treat them as plain text files, so no indexing/code completion/syntax highlighting/etc while still having such files in the Project View tree (so you can edit/delete/upload/etc them if necessary).
这篇关于PHPStorm通过掩码从索引中排除文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!