[英]PHPStorm exclude files by mask from indexing
I'm having a PHP project that for some reason (not my initiative) has some backup files like "somefile - backup.php". 我有一个PHP项目,由于某种原因(不是我的主动)有一些备份文件,如“somefile - backup.php”。 How do I exclude "%backup%.php" from indexing?
如何从索引中排除“%backup%.php”?
Settings/Preferences | Editor | File Types | Ignore files and folders
Settings/Preferences | Editor | File Types | Ignore files and folders
field on the bottom -- add *-backup.php
pattern (or whatever pattern you need). Settings/Preferences | Editor | File Types | Ignore files and folders
底部的Settings/Preferences | Editor | File Types | Ignore files and folders
字段 - 添加*-backup.php
模式(或您需要的任何模式)。
PLEASE NOTE: this affects all projects as it is an IDE-wide setting. 请注意:这会影响所有项目,因为它是一个IDE范围的设置。
Alternatively (have not tried myself, but should work): 或者 (没有试过自己,但应该工作):
Settings/Preferences | Editor | File Types | Recognized File Types | Text
Add *-backup.php
pattern there. 在那里添加
*-backup.php
模式。
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). 这也将影响所有项目..但不是排除它将它们视为纯文本文件,因此没有索引/代码完成/语法突出显示/等在项目视图树中仍然有这样的文件(所以你可以编辑/删除/如有必要,上传/等等)。
"Settings > File Types > Ignore file and folders" and add the path of the folder. “设置>文件类型>忽略文件和文件夹”并添加文件夹的路径。
Example: *.lib;client/build;
示例:
*.lib;client/build;
This worked for me to ignore a folder. 这对我来说忽略了一个文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.