How I Encountered This Issue
While working on projects in VS Code on my Mac, I noticed a bunch of strange files in the file explorer with names like:
._filename.dart
._README.md
They cluttered the explorer and made it harder to focus on the files I actually cared about, so I wanted to hide them.
What’s the Problem?
These
._something files are not created by VS Code.They are AppleDouble metadata files created by macOS, usually when you’re working on:
- Non-Apple filesystems (like FAT, exFAT, some USB drives, network drives), or
- Files synced across systems that don’t support Apple’s extended attributes.
Because those filesystems can’t store Apple’s extra metadata directly, macOS saves that data in separate “sidecar” files that start with
._.They’re mostly harmless, but very noisy in editors like VS Code.
Solution: Hide ._ Files in VS Code
You can hide all files starting with
._ using the files.exclude setting.- Open Settings in VS Code
- Search for:
files.exclude
- Add this pattern to your settings (JSON view):
"files.exclude":{ "**/._*":true }
Or, if you already have other exclude rules, just add:
"**/._*":true
- Or, if your settings looks similar to the image below (UI view):
- Add Pattern
**/._*(This means anywhere in any folder, no matter which depth, any files that start with._)
- Then, files like
._foo.txt,._.DS_Store, etc. will no longer show up in the VS Code explorer.
Additional Notes
- This only hides the files in the VS Code UI. It does not delete them.
- If you really want to remove them from disk, be careful and understand where they’re coming from first (especially on shared or external drives).