0

I got a question regarding the file exclusion feature in VS Code. Currently I am working with LaTex in VSC and I would like Code to ignore most of the master.* files being shown in the File Explorer, except of course the master.tex and master.pdf.

I tried adding some patterns to the settings.json:

"files.exclude": {
    "master.tex": false,
    "master.*": true,   
    "*.lol": true
},

As well as:

"files.exclude": {
    "master.*": true,
    "master.tex": false,   
    "*.lol": true
},

But these don't work, as they exclude all master.* files. I could of course add all the extension by hand, but I would really like there to be a more elegant solution.

Thank you in advance :)

Benno Grimm
  • 533
  • 1
  • 8
  • 16
  • @Alex the question asked is not a duplicate in my opinion. The pattern of exclusion is different and the answer given there cannot apply to this problem. – Muldec Jul 16 '19 at 08:18

1 Answers1

1

There's no Simple way to do this but this syntax does what you want :

"files.exclude": {
    "master.[^tp]*": true, 
    "master.[^tp][^ed]*": true, 
    "master.[^tp][^ed][^xf]*": true, 
    "*.lol": true
},
Muldec
  • 4,641
  • 1
  • 25
  • 44