Sublime Forum

Patterns for File Exclude Patterns

#1

Hi all!

I’ve created a .sublime-project file for my current project - it is an Angular2 project written with TypeScript.
Now, I’ve got my /test folder including some .ts source files, some .json mock endpoint data, and generated .js and .js.map files. I want to hide the generated files from the sidebar, so I’ve added the following line in my project:

"file_exclude_patterns": [ "test/*.js" ]

but the problem is, that my test-data.json file now also is hidden from the sidebar.

How do I exclude all .json files from this filter? I’ve tried it the Regex-way "test/*.js$" and also just negate the match "-test/*.json" but both do not work …

I’ve found a similar topic here which is actually exactly my problem, but it has no answers …

Cheers!
– David

1 Like

#2

You could add all the file but the json one (if the file names keep some consistency)

0 Likes

#3

This topic is really old but I just encounter the exact same problem.
If we could simply define a standard python regular expression, then we could really have complex filters.
It would be really nice to have it instead of this, frankly, very limited patterns

0 Likes