user736893
user736893

Reputation:

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

I have a large project with some files I don't generally need to work with. I frequently use the CTRL+SHIFT+F to find strings across all files in the project. There are files I would like to exclude from this search. I found 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.

First off, this seems odd... "Mark as plain text"? Regardless, I tried it and the files still show up in search. Is there anything else I can do to essentially "ignore" the files without removing them from source control?

Upvotes: 3

Views: 1322

Answers (1)

lena
lena

Reputation: 93878

Text files (marked as plain text, as well as usual .txt files) are not excluded from search - only from navigation/completion. To exclude file from all indexes, you can add it to Exclude files: list in Settings | Directories. See your link, Excluding files and folders by name patterns section

Note that folders can be excluded using Mark directory as/Excluded right-click menu item. There is no such option for individual files unfortunately. If you miss it, please vote for IDEA-139359

Upvotes: 3

Related Questions