3

Is it possible to exclude files from VS Code's "go to file" feature (⌘P) while keeping the files visible in the file explorer? I tried changing the "files.exclude" setting based on this answer, but it hides files in the file explorer in addition to excluding them from "go to file."

starball
  • 20,030
  • 7
  • 43
  • 238

1 Answers1

0

This should happen once you put appropriate exclude patterns into the search.exclude setting. Quick Open shares the exclude patterns used by the search feature. Note that search.exclude inherits all glob patterns from the files.exclude setting.

For your reference / learning purposes, this info was all found by googling "github vscode issues setting for quick open exclude", which led to Add ability to exclude files from "quick open" (cmd-p) #16226.

Note that if you have opened a file before in that workspace that is excluded by your search.exclude setting (or by the inherited files.exclude setting), then that file will begin to show up in the "recent files" listing of Quick Open. To remove that file from that recent files list, click the "x" button to the right of the list item. If you want a deeper solution than that, then you'd probably be interested in this feature-request: Add a setting to exclude files/folders from quick open history #157395 (which was also found by the above google-search query).

You can give the above issue tickets thumbs up reactions to show support for it, and subscribe to them to get notified of discussion and progress. Please refrain from making noisy "+1" or "bump" comments.

starball
  • 20,030
  • 7
  • 43
  • 238