fabiospampinato / vscode-open-multiple-files

Open all files in a folder at once, optionally filtering by a glob.
MIT License
11 stars 2 forks source link

Add a `openMultipleFiles.exclude` setting #3

Closed usernamehw closed 3 years ago

usernamehw commented 5 years ago

At the first try it opened a lot of stuff from node_modules. It would be nice to have an option to use already existing exclusion list.

fabiospampinato commented 5 years ago

I think it would be better to exclude the globs defined in files.exclude rather than search.exclude. The logic being that if you can see a file in the explorer you can open it, if you can't see it you can't open it.

We are already using that setting:

https://github.com/fabiospampinato/vscode-open-multiple-files/blob/2c29bdf5c7f8ad7cc55c35621862e32275a83d66/src/commands.ts#L47

There should be a mention about this in the readme though, I'll update it 👍

usernamehw commented 5 years ago

But I don't have node_modules listed in files.exclude. I open it from time to time from the explorer.

fabiospampinato commented 5 years ago

But I don't have node_modules listed in files.exclude

Not a good idea IMHO.

I open it from time to time from the explorer.

I use this instead.

I suppose we could/should add a openMultipleFiles.exclude setting for additional globs. I'll be happy to consider a PR for this.

fabiospampinato commented 3 years ago

Implemented, use it like this:

{
  "openMultipleFiles.exclude": "**/node_modules",
}