Sublime Forum

How to include a folder excluded by global `folder_exclude_patterns` setting?

#1

Hi, everyone.

I have a problem, I set folder_exclude_patterns to ignore dist in my global sublime preferences, but I need to show it in a specific project.

I tried to set folder_exclude_patterns to [] and folder_include_patterns to ["dist"] in my project config file, both didn’t work.

How could I make a folder show in specific projects but remain excluded in global settings ?

1 Like

#2

This is frustrating me as well.

In my example, node_modules is a directory I want to exclude globally, except when I’m working on one certain project that uses that as part of its naming elsewhere.

Interestingly not only does it not work at the folders level of a project, it also doesn’t work in the settings override portion.

So in a project you can do:

"settings": {
  "caret": "solid"
}

For example, which will change the caret for just that project. However, the "folder_exclude_pattern" parameter seems to get ignored.

I realise it’s hard to manage include and exclude features, because of the inherent complexity in working out the ordering, but I think if project settings were able to override this (or extend it) that might give enough flexibility?

One possible ordering could be (most important rule first)

  • folder exclude
  • folder include
  • project settings exclude
  • project settings include
  • global settings exclude
  • global settings include
  • defaults
0 Likes

#3

Where are you putting the folder_exclude_patterns settings?

See the following issues for a better documentation about the folder_exclude_patterns usage:


0 Likes

#4

@addons_zz, I was putting the exclude at the global level (so all default projects would block node_modules) but then attempting to reinclude it for one project.

I read the links you posted but they where unfortunately not helpful.

However, I managed to solve it by simply excluding node_modules globally, but then for the project that needs it, specifically attaching the node_modules folder as a second folder in the project.

1 Like